SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row
EDIT:
I got closer to resolving the issue using MAX.
However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments.
It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query. So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
the MIN DeptLevel.
/EDIT
I have a rather odd data table I'm bringing into a SSAS Tabular model.
Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
Is there a way to do that?
Example:
SalesGoalsByDepartmentLevel:
Level1 (top level) = 5,000
Level2( lower level) = 0
Level3(lower still) = 500
Level 4(lowest) = 4,250
So note that adding up all the child levels is still $250 shy of the top 5,000.
IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
Is there a way to filter on the current displayed level without aggregating all child levels?
Thanks!
You might want to take a look at the Parent-Child Hierarchies pattern here:
http://www.daxpatterns.com/parent-child-hierarchies/
You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
I hope it will be helpful.
Marco Russo (Blog,
Twitter,
LinkedIn) - sqlbi.com:
Articles, Videos,
Tools, Consultancy,
Training
Format with DAX Formatter and design with
DAX Patterns. Learn
Power Pivot and SSAS Tabular.
Similar Messages
-
Need to get last value of the Quater
Hi expert ,
I have data like this
DATE column Amount column
Jan 1st 20 $
|
Jan 30th 50 $
Fed 1st 60
|
Feb 28th 80$
like this for whole year
I will be providing the Quater promt and selects 1st quater,. then it will show Jan, Feb, march in Date column and respective amounts in amount column.
I need to put some formula in the Amount column.... So that I picks the last day of the quater amonut.
Any help is appreciated.
Thanks
V
Edited by: Venkat Krishna on May 25, 2011 6:43 AMCASE WHEN "Fiscal Date" = TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_QUARTER , 1, TIMESTAMPADD( SQL_TSI_DAY , DAY_OF_QUARTER( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))) THEN "Fact - Amount" END;
Apply the above filter on your amount column.
Thanks,
-Amith. -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
Need to sum max values in a report with Hidden groupings
I have looked all over and have not found my exact situation, so I am posting my first question. I have a report that I have grouped on multiple levels. So my report has a customer/header/detail/release grouping. I have written a custom
expression so that only a single value, which is the max value in the group, is shown in the detail, with all values showing in the release. I have then set my visibility toggle to toggle on header, then detail, then release and I need to sum up those
max values into a field on the report. The custom expression that I have written works correctly when you are showing on the detail level. It gives the correct value, which is the max value in each release.
What I then need the report to do is to sum only that max value and roll that up into the header group, so that I get a total of the max values.
I have tried using the MAX function in my expression to get the correct max value, but I cannot get SSRS 2008 R2 to sum that, and I have tried writing a custom expression that will calculate the max (Non-zero values divided by number of non-zero records) and
both ways work correctly until I try to rollup and sum to the next group level.
I have also tried using a group variable and custom code to get the value and save it to a variable, but I have not had any luck in setting or getting that value correctly back to my report.
At its most basic it feels like I should be able to set a Sum(Max(Fields!ValueColumn.Value) and let SSRS handle how that should be broken out, but after trying that repeatedly I have still had no luck. I cannot adjust the SQL as I need the level of detail
that the report shows, although I could add more fields as long as I don't add any groupings or totals that would reduce the granularity of that data being returned.
Any new avenue to explore would be very helpful.
Thank you in advance,
Chad
Ok, after continuing to search the internet I finally found the extra piece that I was missing that gave me the results I needed. The new expression looks like this:
=runningvalue(Sum(Max(IIF(LEFT(Fields!JobNum.Value,1)="S" AND Fields!Week1STol.Value<>0, CDBL(Fields!Week1STol.Value), 0),"JobItem"),"JobItem"),SUM, "JobItem")
In this I wrapped the original expression of Max in both a Sum and a runningvalue both at the JobItem level to get this rollup value. Now when I open the grouping I get the correct running value at each level.
What this really gives to me is a running total at each of four groupings, even with a "max" value at the detail level. This also allows me to total a max value inline on the report, without needing a hidden row, or report footer.
Thank you to everyone who looked at this, I hope it helps someone else. If this answer is not clear enough, please don't hesitate to add to the comments and I will try to clarify.
Thank you, Chad -
Need help getting a value from an XML column
Hi,
I need to get a value from an XML column in a table (the column is called TEST_XML). I have tried using the Select TEST_XML.value function but it always returns nulls. Could you please take a look at the following xml sample stored in the TEST_XML column
and help me with the query syntax to get the value of the Bank_Account_Number?.
=================
<?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us"
productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
<?mso-application progid="InfoPath.Document"?>
<tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<Name />
<Description />
<Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP"
SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName=""
MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="
" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1"
/>
<Init_Information>
<Date_Required xsi:nil="true" />
</Init_Information>
<General_Data>
<Action>U</Action>
<Business_Partner_Number xsi:nil="true" />
<Business_Partner_Grouping>G16</Business_Partner_Grouping>
<Business_Partner_Type>G003</Business_Partner_Type>
<Title>002</Title>
<House_Number xsi:nil="true" />
<Street xsi:nil="true" />
<Street_2 xsi:nil="true" />
<Street_3 xsi:nil="true" />
<City>ABIDJAN</City>
<Country>CI</Country>
<City_Postal_Code xsi:nil="true" />
<Region xsi:nil="true" />
<PO_Box xsi:nil="true" />
<PO_Box_Postal_Code xsi:nil="true" />
<Language>FR</Language>
<Purpose>Z003 UNVs</Purpose>
<Telephone_Number />
<Mobile_Phone_Number>90075777</Mobile_Phone_Number>
<Fax_Number xsi:nil="true" />
<Email_Address>[email protected]</Email_Address>
<First_Name>Mickey</First_Name>
<Middle_Name xsi:nil="true" />
<Last_Name>Mouse</Last_Name>
<Gender>2</Gender>
<Index_Number>999999</Index_Number>
<Date_of_Birth>1969-11-29</Date_of_Birth>
<Nationality>CI</Nationality>
<DOB_Day>29</DOB_Day>
<DOB_Month>11</DOB_Month>
<DOB_Year>1969</DOB_Year>
<RelationBPGroupingBPType xsi:nil="true" />
<BPType_Z016>Z003</BPType_Z016>
<BPType_Z020 xsi:nil="true" />
<BPType_Z021 xsi:nil="true" />
<Sub_Area2>General and Banking</Sub_Area2>
<SR_Description>Business Partner Number:
Business Partner Type: UNVs
First Name: FirstName
Last Name: LastName</SR_Description>
<Sub_Area_Aux>79</Sub_Area_Aux>
<thereis_general>TRUE</thereis_general>
<thereis_banking>TRUE</thereis_banking>
<auxGeneric>GDB</auxGeneric>
<Business_Area_BP>P022</Business_Area_BP>
<Search_Term_1>FirstName</Search_Term_1>
<Search_Term_2>LastName</Search_Term_2>
<Responsible_Institution xsi:nil="true" />
<Add_Additional_Address xsi:nil="true" />
<Add_Additional_Communication xsi:nil="true" />
<BP_Role_Main xsi:nil="true" />
<BP_Role_Additional xsi:nil="true" />
<AddresType xsi:nil="true" />
<Specify xsi:nil="true" />
<BP_Category xsi:nil="true" />
<AddRemoveAddress xsi:nil="true" />
<AddRemoveCommunication xsi:nil="true" />
<BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
</General_Data>
<Primary_Bank_Account>
<Bank_Location_ID>0001</Bank_Location_ID>
<Bank_Country>ML</Bank_Country>
<Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
<Bank_Account_Type>1</Bank_Account_Type>
<IBAN xsi:nil="true" />
<CurrencyPrimaryIBAN xsi:nil="true" />
<Account_Holder_Name xsi:nil="true" />
<CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
<Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
<NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
<NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
<CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
<NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
<NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
<NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
<NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
<NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
<NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
<NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
<Primary_Type_of_Account xsi:nil="true" />
<invisible1>National ID</invisible1>
<bDontHasBankAccount>false</bDontHasBankAccount>
<bBankAccountNotAvailable>false</bBankAccountNotAvailable>
<CashOrCheck xsi:nil="true" />
<CashAccountingClerk xsi:nil="true" />
<BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
<CheckOptions xsi:nil="true" />
<SameOrDifferent_IBAN_Primary xsi:nil="true" />
<SameOrDifferent_National_Primary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
<AccountTitle_IBAN_Primary xsi:nil="true" />
<AccountTitle_National_Primary xsi:nil="true" />
<AccountTitle_NotIBAN_Primary xsi:nil="true" />
<ExplainWhy_IBAN_Primary xsi:nil="true" />
<ExplainWhy_National_Primary xsi:nil="true" />
<ExplainWhy_NotIBAN_Primary xsi:nil="true" />
<Bank_Key xsi:nil="true" />
<Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Primary xsi:nil="true" />
<Special_Instructions_National_Primary xsi:nil="true" />
<Special_Instructions_NotIBAN_Primary xsi:nil="true" />
<RecordTypePrimary xsi:nil="true" />
<Payment_Method_UnderCashCheck xsi:nil="true" />
<ValidUntilPrimaryBank xsi:nil="true" />
</Primary_Bank_Account>
<Primary_Intermediary_Bank_Account>
<Intermediary_Bank_Location_ID xsi:nil="true" />
<Intermediary_Bank_Country xsi:nil="true" />
<Intermediary_Bank_Account_Number xsi:nil="true" />
<Intermediary_Bank_Account_Type xsi:nil="true" />
<Intermediary_IBAN xsi:nil="true" />
<CurrencyIntermediaryIBAN xsi:nil="true" />
<Intermediary_Account_Holder_Name xsi:nil="true" />
<CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
<Intermediary_Routing_Number_National_ID xsi:nil="true" />
<IntermediaryNonIbanAccountHolderName xsi:nil="true" />
<IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
<NonIbanIntermediaryBankAccountType xsi:nil="true" />
<NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
<IntermediaryBankAccountVisible xsi:nil="true" />
<Intermediary_Type_of_Account xsi:nil="true" />
<invisible2 xsi:nil="true" />
<Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
<SameOrDifferent_National_Intermediary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
<AccountTitle_IBAN_Intermediary xsi:nil="true" />
<AccountTitle_National_Intermediary xsi:nil="true" />
<AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
<ExplainWhy_IBAN_Intermediary xsi:nil="true" />
<ExplainWhy_National_Intermediary xsi:nil="true" />
<ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
</Primary_Intermediary_Bank_Account>
<Additional_Bank_Account>
<Additional_Bank_Location_ID xsi:nil="true" />
<Additional_Bank_Country xsi:nil="true" />
<Additional_Bank_Account_Number xsi:nil="true" />
<Additional_Bank_Account_Type xsi:nil="true" />
<Additional_IBAN xsi:nil="true" />
<CurrencyAdditionalIBAN xsi:nil="true" />
<Additional_Account_Holder_Name xsi:nil="true" />
<CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
<Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
<AdditionalNonIbanAccountHolderName xsi:nil="true" />
<AdditionalNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
<NonIbanAdditionalBankAccountType xsi:nil="true" />
<NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
<AdditionalBankAccountVisible xsi:nil="true" />
<Additional_Type_of_Account xsi:nil="true" />
<invisible3 xsi:nil="true" />
<Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Additional xsi:nil="true" />
<SameOrDifferent_National_Additional xsi:nil="true" />
<SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
<AccountTitle_IBAN_Additional xsi:nil="true" />
<AccountTitle_National_Additional xsi:nil="true" />
<AccountTitle_NotIBAN_Additional xsi:nil="true" />
<ExplainWhy_IBAN_Additional xsi:nil="true" />
<ExplainWhy_National_Additional xsi:nil="true" />
<ExplainWhy_NotIBAN_Additional xsi:nil="true" />
<Additional_Bank_Key xsi:nil="true" />
<Additional_Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Additional xsi:nil="true" />
<Special_Instructions_National_Additional xsi:nil="true" />
<Special_Instructions_NotIBAN_Additional xsi:nil="true" />
<RecordTypeAdditional xsi:nil="true" />
<ValidUntilAdditionalBank xsi:nil="true" />
</Additional_Bank_Account>
<Payment_Information>
<Block_for_payment>1</Block_for_payment>
<Payment_Method xsi:nil="true" />
<Accounting_Clerk xsi:nil="true" />
<PaymentMethodAdditional xsi:nil="true" />
<AccountingClerkAdditional xsi:nil="true" />
</Payment_Information>
<Additional_Field_for_Purchasing_view>
<Purchase_order_currency>XOF</Purchase_order_currency>
<BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
<Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
<Posting_block_for_company_code xsi:nil="true" />
<Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
<Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
<Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
<BPRoleDateBegin xsi:nil="true" />
<BPRoleDateEnd xsi:nil="true" />
</Additional_Field_for_Purchasing_view>
<Requestor_Information>
<Requested_By>REQUESTOR</Requested_By>
<Org_Unit>MVCON</Org_Unit>
<Date>2014-05-19</Date>
<Reason xsi:nil="true" />
<On_Form xsi:nil="true" />
<Attached xsi:nil="true" />
<Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
<RequestorBusinessArea>P022</RequestorBusinessArea>
<RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
<Display_Review_Approval_Section xsi:nil="true" />
</Requestor_Information>
<Review_Information>
<Review_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Review_Information>
<Approval_Information>
<Approved_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Approval_Information>
<Reception_Information>
<Received_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Reception_Information>
<Entry_Information>
<Entered_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Entry_Information>
<Verification_Information>
<Verified_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Verification_Information>
<Order_Currency>
<Order_Currency_New xsi:nil="true" />
</Order_Currency>
<Change_BP_Group>
<BP_Group_Existing xsi:nil="true" />
<BP_Type_Existing xsi:nil="true" />
<BP_Role_Existing xsi:nil="true" />
<BP_Group_New xsi:nil="true" />
<BP_Type_New xsi:nil="true" />
<BP_Role_New xsi:nil="true" />
<BPTypeAuxVisible1 xsi:nil="true" />
<BPTypeAuxVisible2 xsi:nil="true" />
</Change_BP_Group>
<Expire_or_Add_Validity_Period_to_BP_Role>
<Additional_BP_Role_Entry xsi:nil="true" />
</Expire_or_Add_Validity_Period_to_BP_Role>
<Add_Alternative_Payees>
<Additional_Payee xsi:nil="true" />
</Add_Alternative_Payees>
<Establish_BP_Relationship>
<Additional_Relationship_EntryB xsi:nil="true" />
</Establish_BP_Relationship>
<Block_BP>
<PaymentBlock xsi:nil="true" />
<Reason_Payment_Block xsi:nil="true" />
<PostingBlock xsi:nil="true" />
<Reason_Posting_Block xsi:nil="true" />
<PurchasingBlock xsi:nil="true" />
<Reason_Purchasing_Block xsi:nil="true" />
<CentralBlock xsi:nil="true" />
<Reason_Central_Block xsi:nil="true" />
<FlagforArchiving xsi:nil="true" />
<Reason_Flag_Block xsi:nil="true" />
<TerminateBP xsi:nil="true" />
<Reason_Terminate_Block xsi:nil="true" />
</Block_BP>
<Options>
<Option1>true</Option1>
<Option2>false</Option2>
<Option3>true</Option3>
<Option4>false</Option4>
<Option5>false</Option5>
<Option6>false</Option6>
<Option7>false</Option7>
<Option8>false</Option8>
<Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
</Options>
<Sec_Update_BP_Legal_Name>
<NewLegalFirstName xsi:nil="true" />
<NewLegalMiddleName xsi:nil="true" />
<NewLegalLastName xsi:nil="true" />
</Sec_Update_BP_Legal_Name>
<line>
<IDType>
<IDType xsi:nil="true" />
<LegacyIDNumber xsi:nil="true" />
<Responsible_Institution_Legacy xsi:nil="true" />
<AddRemoveID_R xsi:nil="true" />
</IDType>
</line>
<Address>
<Section_Address>
<AddressTypeR xsi:nil="true" />
<StreetR xsi:nil="true" />
<StreetR_2 xsi:nil="true" />
<StreetR_3 xsi:nil="true" />
<House_NumberR xsi:nil="true" />
<City_Postal_CodeR xsi:nil="true" />
<CityR xsi:nil="true" />
<CountryR xsi:nil="true" />
<StateRegionProvinceR xsi:nil="true" />
<PO_BoxR xsi:nil="true" />
<PO_Box_PostalCodeR xsi:nil="true" />
<SpecifyR xsi:nil="true" />
<AddRemoveAddressR xsi:nil="true" />
</Section_Address>
<PO_BoxR2>
<SecPoBoxR2>
<PO_BoxR2 xsi:nil="true" />
<PO_Box_Postal_CodeR2 xsi:nil="true" />
</SecPoBoxR2>
</PO_BoxR2>
</Address>
<Communication>
<Communication_Section>
<Telephone_NumberR xsi:nil="true" />
<Mobile_Phone_NumberR xsi:nil="true" />
<Fax_NumberR xsi:nil="true" />
<Email_AddressR xsi:nil="true" />
<AddRemoveCommunicationR xsi:nil="true" />
</Communication_Section>
</Communication>
<Expire_or_Add_Validaty_to_BP_RoleR>
<Expire_or_Add_Validaty>
<BP_RoleR xsi:nil="true" />
<Expire_or_Add_Validity_PeriodR xsi:nil="true" />
<Valid_FromR xsi:nil="true" />
<Valid_ToR xsi:nil="true" />
</Expire_or_Add_Validaty>
</Expire_or_Add_Validaty_to_BP_RoleR>
<Add_Alternative_PayeesR>
<Alternative_Payees>
<Add_Update_Remove xsi:nil="true" />
<Permited_Payee_BP_NumberR xsi:nil="true" />
<Name_Alt_PayeeR xsi:nil="true" />
<Index_NumberR xsi:nil="true" />
<TitleR xsi:nil="true" />
<First_NameR xsi:nil="true" />
<Middle_NameR xsi:nil="true" />
<Last_NameR xsi:nil="true" />
</Alternative_Payees>
</Add_Alternative_PayeesR>
<Establish_BP_RelationshipR>
<Relationship>
<BP_Number_Main xsi:nil="true" />
<Relationship_CategoryR xsi:nil="true" />
<ValidFromR xsi:nil="true" />
<ValidToRelationshipR xsi:nil="true" />
<BPNumber_SecondaryR xsi:nil="true" />
<Index_Number_Secondary_Relationship xsi:nil="true" />
<Business_Area_Secondary xsi:nil="true" />
<Title_Secondary_BP xsi:nil="true" />
<First_Name_Secondary_BPR xsi:nil="true" />
<MiddleNameSecondaryBPR xsi:nil="true" />
<LastNameSecondaryBP xsi:nil="true" />
<Add_Update_DeleteR xsi:nil="true" />
</Relationship>
</Establish_BP_RelationshipR>
<PO_BoxR>
<SecPoBoxR>
<PO_BoxR xsi:nil="true" />
<PO_Box_Postal_CodeR xsi:nil="true" />
</SecPoBoxR>
</PO_BoxR>
</tns:OF_Forms>See this illustration
declare @x xml='<?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us" productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
<?mso-application progid="InfoPath.Document"?>
<tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<Name />
<Description />
<Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP" SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName="" MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="
" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1" />
<Init_Information>
<Date_Required xsi:nil="true" />
</Init_Information>
<General_Data>
<Action>U</Action>
<Business_Partner_Number xsi:nil="true" />
<Business_Partner_Grouping>G16</Business_Partner_Grouping>
<Business_Partner_Type>G003</Business_Partner_Type>
<Title>002</Title>
<House_Number xsi:nil="true" />
<Street xsi:nil="true" />
<Street_2 xsi:nil="true" />
<Street_3 xsi:nil="true" />
<City>ABIDJAN</City>
<Country>CI</Country>
<City_Postal_Code xsi:nil="true" />
<Region xsi:nil="true" />
<PO_Box xsi:nil="true" />
<PO_Box_Postal_Code xsi:nil="true" />
<Language>FR</Language>
<Purpose>Z003 UNVs</Purpose>
<Telephone_Number />
<Mobile_Phone_Number>90075777</Mobile_Phone_Number>
<Fax_Number xsi:nil="true" />
<Email_Address>[email protected]</Email_Address>
<First_Name>Mickey</First_Name>
<Middle_Name xsi:nil="true" />
<Last_Name>Mouse</Last_Name>
<Gender>2</Gender>
<Index_Number>999999</Index_Number>
<Date_of_Birth>1969-11-29</Date_of_Birth>
<Nationality>CI</Nationality>
<DOB_Day>29</DOB_Day>
<DOB_Month>11</DOB_Month>
<DOB_Year>1969</DOB_Year>
<RelationBPGroupingBPType xsi:nil="true" />
<BPType_Z016>Z003</BPType_Z016>
<BPType_Z020 xsi:nil="true" />
<BPType_Z021 xsi:nil="true" />
<Sub_Area2>General and Banking</Sub_Area2>
<SR_Description>Business Partner Number:
Business Partner Type: UNVs
First Name: FirstName
Last Name: LastName</SR_Description>
<Sub_Area_Aux>79</Sub_Area_Aux>
<thereis_general>TRUE</thereis_general>
<thereis_banking>TRUE</thereis_banking>
<auxGeneric>GDB</auxGeneric>
<Business_Area_BP>P022</Business_Area_BP>
<Search_Term_1>FirstName</Search_Term_1>
<Search_Term_2>LastName</Search_Term_2>
<Responsible_Institution xsi:nil="true" />
<Add_Additional_Address xsi:nil="true" />
<Add_Additional_Communication xsi:nil="true" />
<BP_Role_Main xsi:nil="true" />
<BP_Role_Additional xsi:nil="true" />
<AddresType xsi:nil="true" />
<Specify xsi:nil="true" />
<BP_Category xsi:nil="true" />
<AddRemoveAddress xsi:nil="true" />
<AddRemoveCommunication xsi:nil="true" />
<BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
</General_Data>
<Primary_Bank_Account>
<Bank_Location_ID>0001</Bank_Location_ID>
<Bank_Country>ML</Bank_Country>
<Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
<Bank_Account_Type>1</Bank_Account_Type>
<IBAN xsi:nil="true" />
<CurrencyPrimaryIBAN xsi:nil="true" />
<Account_Holder_Name xsi:nil="true" />
<CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
<Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
<NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
<NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
<CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
<NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
<NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
<NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
<NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
<NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
<NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
<NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
<Primary_Type_of_Account xsi:nil="true" />
<invisible1>National ID</invisible1>
<bDontHasBankAccount>false</bDontHasBankAccount>
<bBankAccountNotAvailable>false</bBankAccountNotAvailable>
<CashOrCheck xsi:nil="true" />
<CashAccountingClerk xsi:nil="true" />
<BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
<CheckOptions xsi:nil="true" />
<SameOrDifferent_IBAN_Primary xsi:nil="true" />
<SameOrDifferent_National_Primary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
<AccountTitle_IBAN_Primary xsi:nil="true" />
<AccountTitle_National_Primary xsi:nil="true" />
<AccountTitle_NotIBAN_Primary xsi:nil="true" />
<ExplainWhy_IBAN_Primary xsi:nil="true" />
<ExplainWhy_National_Primary xsi:nil="true" />
<ExplainWhy_NotIBAN_Primary xsi:nil="true" />
<Bank_Key xsi:nil="true" />
<Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Primary xsi:nil="true" />
<Special_Instructions_National_Primary xsi:nil="true" />
<Special_Instructions_NotIBAN_Primary xsi:nil="true" />
<RecordTypePrimary xsi:nil="true" />
<Payment_Method_UnderCashCheck xsi:nil="true" />
<ValidUntilPrimaryBank xsi:nil="true" />
</Primary_Bank_Account>
<Primary_Intermediary_Bank_Account>
<Intermediary_Bank_Location_ID xsi:nil="true" />
<Intermediary_Bank_Country xsi:nil="true" />
<Intermediary_Bank_Account_Number xsi:nil="true" />
<Intermediary_Bank_Account_Type xsi:nil="true" />
<Intermediary_IBAN xsi:nil="true" />
<CurrencyIntermediaryIBAN xsi:nil="true" />
<Intermediary_Account_Holder_Name xsi:nil="true" />
<CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
<Intermediary_Routing_Number_National_ID xsi:nil="true" />
<IntermediaryNonIbanAccountHolderName xsi:nil="true" />
<IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
<NonIbanIntermediaryBankAccountType xsi:nil="true" />
<NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
<IntermediaryBankAccountVisible xsi:nil="true" />
<Intermediary_Type_of_Account xsi:nil="true" />
<invisible2 xsi:nil="true" />
<Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
<SameOrDifferent_National_Intermediary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
<AccountTitle_IBAN_Intermediary xsi:nil="true" />
<AccountTitle_National_Intermediary xsi:nil="true" />
<AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
<ExplainWhy_IBAN_Intermediary xsi:nil="true" />
<ExplainWhy_National_Intermediary xsi:nil="true" />
<ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
</Primary_Intermediary_Bank_Account>
<Additional_Bank_Account>
<Additional_Bank_Location_ID xsi:nil="true" />
<Additional_Bank_Country xsi:nil="true" />
<Additional_Bank_Account_Number xsi:nil="true" />
<Additional_Bank_Account_Type xsi:nil="true" />
<Additional_IBAN xsi:nil="true" />
<CurrencyAdditionalIBAN xsi:nil="true" />
<Additional_Account_Holder_Name xsi:nil="true" />
<CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
<Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
<AdditionalNonIbanAccountHolderName xsi:nil="true" />
<AdditionalNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
<NonIbanAdditionalBankAccountType xsi:nil="true" />
<NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
<AdditionalBankAccountVisible xsi:nil="true" />
<Additional_Type_of_Account xsi:nil="true" />
<invisible3 xsi:nil="true" />
<Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Additional xsi:nil="true" />
<SameOrDifferent_National_Additional xsi:nil="true" />
<SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
<AccountTitle_IBAN_Additional xsi:nil="true" />
<AccountTitle_National_Additional xsi:nil="true" />
<AccountTitle_NotIBAN_Additional xsi:nil="true" />
<ExplainWhy_IBAN_Additional xsi:nil="true" />
<ExplainWhy_National_Additional xsi:nil="true" />
<ExplainWhy_NotIBAN_Additional xsi:nil="true" />
<Additional_Bank_Key xsi:nil="true" />
<Additional_Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Additional xsi:nil="true" />
<Special_Instructions_National_Additional xsi:nil="true" />
<Special_Instructions_NotIBAN_Additional xsi:nil="true" />
<RecordTypeAdditional xsi:nil="true" />
<ValidUntilAdditionalBank xsi:nil="true" />
</Additional_Bank_Account>
<Payment_Information>
<Block_for_payment>1</Block_for_payment>
<Payment_Method xsi:nil="true" />
<Accounting_Clerk xsi:nil="true" />
<PaymentMethodAdditional xsi:nil="true" />
<AccountingClerkAdditional xsi:nil="true" />
</Payment_Information>
<Additional_Field_for_Purchasing_view>
<Purchase_order_currency>XOF</Purchase_order_currency>
<BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
<Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
<Posting_block_for_company_code xsi:nil="true" />
<Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
<Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
<Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
<BPRoleDateBegin xsi:nil="true" />
<BPRoleDateEnd xsi:nil="true" />
</Additional_Field_for_Purchasing_view>
<Requestor_Information>
<Requested_By>REQUESTOR</Requested_By>
<Org_Unit>MVCON</Org_Unit>
<Date>2014-05-19</Date>
<Reason xsi:nil="true" />
<On_Form xsi:nil="true" />
<Attached xsi:nil="true" />
<Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
<RequestorBusinessArea>P022</RequestorBusinessArea>
<RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
<Display_Review_Approval_Section xsi:nil="true" />
</Requestor_Information>
<Review_Information>
<Review_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Review_Information>
<Approval_Information>
<Approved_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Approval_Information>
<Reception_Information>
<Received_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Reception_Information>
<Entry_Information>
<Entered_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Entry_Information>
<Verification_Information>
<Verified_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Verification_Information>
<Order_Currency>
<Order_Currency_New xsi:nil="true" />
</Order_Currency>
<Change_BP_Group>
<BP_Group_Existing xsi:nil="true" />
<BP_Type_Existing xsi:nil="true" />
<BP_Role_Existing xsi:nil="true" />
<BP_Group_New xsi:nil="true" />
<BP_Type_New xsi:nil="true" />
<BP_Role_New xsi:nil="true" />
<BPTypeAuxVisible1 xsi:nil="true" />
<BPTypeAuxVisible2 xsi:nil="true" />
</Change_BP_Group>
<Expire_or_Add_Validity_Period_to_BP_Role>
<Additional_BP_Role_Entry xsi:nil="true" />
</Expire_or_Add_Validity_Period_to_BP_Role>
<Add_Alternative_Payees>
<Additional_Payee xsi:nil="true" />
</Add_Alternative_Payees>
<Establish_BP_Relationship>
<Additional_Relationship_EntryB xsi:nil="true" />
</Establish_BP_Relationship>
<Block_BP>
<PaymentBlock xsi:nil="true" />
<Reason_Payment_Block xsi:nil="true" />
<PostingBlock xsi:nil="true" />
<Reason_Posting_Block xsi:nil="true" />
<PurchasingBlock xsi:nil="true" />
<Reason_Purchasing_Block xsi:nil="true" />
<CentralBlock xsi:nil="true" />
<Reason_Central_Block xsi:nil="true" />
<FlagforArchiving xsi:nil="true" />
<Reason_Flag_Block xsi:nil="true" />
<TerminateBP xsi:nil="true" />
<Reason_Terminate_Block xsi:nil="true" />
</Block_BP>
<Options>
<Option1>true</Option1>
<Option2>false</Option2>
<Option3>true</Option3>
<Option4>false</Option4>
<Option5>false</Option5>
<Option6>false</Option6>
<Option7>false</Option7>
<Option8>false</Option8>
<Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
</Options>
<Sec_Update_BP_Legal_Name>
<NewLegalFirstName xsi:nil="true" />
<NewLegalMiddleName xsi:nil="true" />
<NewLegalLastName xsi:nil="true" />
</Sec_Update_BP_Legal_Name>
<line>
<IDType>
<IDType xsi:nil="true" />
<LegacyIDNumber xsi:nil="true" />
<Responsible_Institution_Legacy xsi:nil="true" />
<AddRemoveID_R xsi:nil="true" />
</IDType>
</line>
<Address>
<Section_Address>
<AddressTypeR xsi:nil="true" />
<StreetR xsi:nil="true" />
<StreetR_2 xsi:nil="true" />
<StreetR_3 xsi:nil="true" />
<House_NumberR xsi:nil="true" />
<City_Postal_CodeR xsi:nil="true" />
<CityR xsi:nil="true" />
<CountryR xsi:nil="true" />
<StateRegionProvinceR xsi:nil="true" />
<PO_BoxR xsi:nil="true" />
<PO_Box_PostalCodeR xsi:nil="true" />
<SpecifyR xsi:nil="true" />
<AddRemoveAddressR xsi:nil="true" />
</Section_Address>
<PO_BoxR2>
<SecPoBoxR2>
<PO_BoxR2 xsi:nil="true" />
<PO_Box_Postal_CodeR2 xsi:nil="true" />
</SecPoBoxR2>
</PO_BoxR2>
</Address>
<Communication>
<Communication_Section>
<Telephone_NumberR xsi:nil="true" />
<Mobile_Phone_NumberR xsi:nil="true" />
<Fax_NumberR xsi:nil="true" />
<Email_AddressR xsi:nil="true" />
<AddRemoveCommunicationR xsi:nil="true" />
</Communication_Section>
</Communication>
<Expire_or_Add_Validaty_to_BP_RoleR>
<Expire_or_Add_Validaty>
<BP_RoleR xsi:nil="true" />
<Expire_or_Add_Validity_PeriodR xsi:nil="true" />
<Valid_FromR xsi:nil="true" />
<Valid_ToR xsi:nil="true" />
</Expire_or_Add_Validaty>
</Expire_or_Add_Validaty_to_BP_RoleR>
<Add_Alternative_PayeesR>
<Alternative_Payees>
<Add_Update_Remove xsi:nil="true" />
<Permited_Payee_BP_NumberR xsi:nil="true" />
<Name_Alt_PayeeR xsi:nil="true" />
<Index_NumberR xsi:nil="true" />
<TitleR xsi:nil="true" />
<First_NameR xsi:nil="true" />
<Middle_NameR xsi:nil="true" />
<Last_NameR xsi:nil="true" />
</Alternative_Payees>
</Add_Alternative_PayeesR>
<Establish_BP_RelationshipR>
<Relationship>
<BP_Number_Main xsi:nil="true" />
<Relationship_CategoryR xsi:nil="true" />
<ValidFromR xsi:nil="true" />
<ValidToRelationshipR xsi:nil="true" />
<BPNumber_SecondaryR xsi:nil="true" />
<Index_Number_Secondary_Relationship xsi:nil="true" />
<Business_Area_Secondary xsi:nil="true" />
<Title_Secondary_BP xsi:nil="true" />
<First_Name_Secondary_BPR xsi:nil="true" />
<MiddleNameSecondaryBPR xsi:nil="true" />
<LastNameSecondaryBP xsi:nil="true" />
<Add_Update_DeleteR xsi:nil="true" />
</Relationship>
</Establish_BP_RelationshipR>
<PO_BoxR>
<SecPoBoxR>
<PO_BoxR xsi:nil="true" />
<PO_Box_Postal_CodeR xsi:nil="true" />
</SecPoBoxR>
</PO_BoxR>
</tns:OF_Forms>'
;WITH XMLNAMESPACES ('OF_Messages.Schemas.OF_Forms' AS tns)
SELECT m.n.value('(Bank_Account_Number)[1]','varchar(100)')
FROM @x.nodes('/tns:OF_Forms/Primary_Bank_Account')m(n)
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Query help needed in finding max value between two columns
I have a table as follows:
-- INSERTING into TESTTABLE
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('A','4.5','AA',0.3,'AB',5.5);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('B','1','BB',2.5,'BC',6.9);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('C','2.6','CC',3.3,'CD',1.4);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('D','1.8','DD',2.9,'DE',1.2);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('E','6.8','EE',4.8,'EF',9.6);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('F','2.0','FF',6.34,'FG',3.9);
Insert into TESTTABLE (COLA,COL2,COLC,COLD,COLE,COLF) values ('G','1.7','GG',3.6,'GH',5.8);
I want to get results as follows:
COLA COL2 MaxCol MaxColVal
A 4.5 AB 5.5
B 1 BC 6.9
C 2.6 CC 3.3
D 1.8 DD 2.9
E 6.8 EF 9.6
F 2.0 FF 6.34
G 1.7 GH 5.8I want to get the max value of either of the columns COLD or COLF.. Whichever column has got max value, then the corresponding value of COLC and COLE should be returned..
For eg., in first row, COLF has higher value than COLD.. ie., COLF = 5.5 > COLD = 0.3, so for row1, i want the result as MaxCol is AB and MaxColvalue is 5.5..
Similarly for third row, COLD =3.3 > COLF=1.4, so for 3rd row, i want the result as MaxCol is CC and MaxColvalue is 3.3
How is it possible to do this in a qery? Any help.. please..SQL> select cola
2 , col2
3 , case greatest(cold,colf)
4 when cold then colc
5 else cole
6 end maxcol
7 , greatest(cold,colf) maxcolval
8 from testtable
9 /
C COL MA MAXCOLVAL
A 4.5 AB 5,5
B 1 BC 6,9
C 2.6 CC 3,3
D 1.8 DD 2,9
E 6.8 EF 9,6
F 2.0 FF 6,34
G 1.7 GH 5,8
7 rijen zijn geselecteerd.Regards,
Rob. -
Need to get max month in quarter
Hi,
I need to get max month exchange rates in quarter for my caluclation view ?
Can you any one suggest ?
Regards,
RamAutoresponse
max month in quarter using hana sql -
How to get Max value in Essbase
Hi,
I have problem to get max value from 3 years in Essbase.
How can i get max value from Dec 2009,Dec 2010, Dec 2011.
Suppose value of Dec 2009 = 1000, Dec 2010 = 1500 and Dec 2011 = 2000
I want to get max value from these three value, how can i do that in Essbase Calculation Script.
Any idea?
Thanks.
Regards,
JoniYou have not specified if year and period are separate dimensions, anyway as always there a number of different possbilities and I don't have much time today to think about it but one method could be to use @MAXRANGE
FIX(Other members to fix on,"Dec")
"MemberToStoreAgainst" = @MAXRANGE("MemberToFindMaxRangeFor","2009:"2011");
ENDFIX
Cheers
John
http://john-goodwin.blogspot.com/ -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
Problem getting parameter values at the service end point
I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
� Service End Point Definition (in EJB)
public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
System.out.println(propertyName);
System.out.println(PMSCode);
System.out.println(streetNumPrefix);
........ taking printout of all the paramters
� This is my WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types/>
<message name="NMServiceServantInterface_setNewAddress">
<part name="String_1" type="xsd:string"/>
<part name="String_2" type="xsd:string"/>
<part name="String_3" type="xsd:string"/>
<part name="String_4" type="xsd:string"/>
<part name="int_5" type="xsd:int"/>
<part name="String_6" type="xsd:string"/>
<part name="int_7" type="xsd:int"/>
<part name="String_8" type="xsd:string"/>
<part name="String_9" type="xsd:string"/>
<part name="String_10" type="xsd:string"/>
<part name="String_11" type="xsd:string"/>
<part name="String_12" type="xsd:string"/>
<part name="String_13" type="xsd:string"/>
<part name="String_14" type="xsd:string"/>
<part name="String_15" type="xsd:string"/>
<part name="String_16" type="xsd:string"/>
<part name="String_17" type="xsd:string"/>
<part name="String_18" type="xsd:string"/>
<part name="int_19" type="xsd:int"/>
<part name="int_20" type="xsd:int"/>
<part name="String_21" type="xsd:string"/>
<part name="String_22" type="xsd:string"/>
<part name="int_23" type="xsd:int"/>
<part name="int_24" type="xsd:int"/>
<part name="String_25" type="xsd:string"/>
<part name="String_26" type="xsd:string"/>
<part name="String_27" type="xsd:string"/>
<part name="int_28" type="xsd:int"/>
<part name="int_29" type="xsd:int"/>
<part name="int_30" type="xsd:int"/>
<part name="String_31" type="xsd:string"/>
<part name="String_32" type="xsd:string"/>
<part name="int_33" type="xsd:int"/>
<part name="int_34" type="xsd:int"/>
<part name="String_35" type="xsd:string"/></message>
<message name="NMServiceServantInterface_setNewAddressResponse">
<part name="result" type="xsd:string"/></message>
<portType name="NMServiceServantInterface">
<operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
<input message="tns:NMServiceServantInterface_setNewAddress"/>
<output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
<binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
<operation name="setNewAddress">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="NMService">
<port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
<soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
� I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
ThanksI just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy . -
Need to set default values for the fields plant and location in ME21N
Hi All,
i need to set default values for the fields plant and location in ME21N tcode.
In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
How to resolve this?
Thanks in Advancehi .
i needed to set default strorage location and plant in personal setting in me21n.
i solve it with this way.
go to program SAPLMEPERS in se38.
create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
in this module write:
if MEPOITEM_PROP-WERKS is INITIAL and MEPOITEM_PROP-LGORT is INITIAL.
MEPOITEM_PROP-WERKS = '1000'.
MEPOITEM_PROP-LGORT = '0032'.
endif.
this is the solution.
best regards.
maryam -
I deleted gardens of time yesterday and need to get it back with the current data and progress. Is this possible?
Is that on an iPad, iPod Touch or iPhone?
-
Have the new iphone 4s. need to get itunes to recoginize the phone
Have the new iphone 4s and need to get itunes to recognize the phone when I plug it in
Any response at all when the device is plugged in?
Tried a different USB port?
Ddifferent sync cable?
Reboot the computer?
Reboot the device?
Maybe you are looking for
-
X230t and Windows 8 - tablet rotate and control buttons don't work
I am the proud owner of a new x230 tablet and I couldn't resist the tempation to load up Windows 8 on it. Overall I have found the operating system to work fairly well on the system as installed "out of the box"; however, I have noticed that when th
-
Adobe pdf printer save dialog box opens in the background - progress bar shows Not Responding
I have two users who have Acrobat X Pro version 10.1.4 that are experiencing the same things. First, one person just changed laptops and the new one has a fresh Windows 7 Enterprise X64 image and new installation of Adobe Acrobat X Pro. When he use
-
I have MacBook Pro 2.2GHz Intel Core i7 (15-inch DDR3) Early-2011 and I want to upgrade RAM, What is the MAX RAM can I get it 8GB or 16GB?
-
Hi, Currently we have a huge folder with allot of pdf files in it and we are running an index service on it. The index service is used on a couple of web sites that searches inside the documents for key words. It works fine with pdf's,word etc. We re
-
HT2534 How to edit my phone no.for iMessage
Please help guys my iMessage is not working I used to put two phone nos when I made an apple id account N now I'm not using the other one but the other one is not working and I don't know how to delete the other no fr other account because I don't re