Need Help in Next value of column to another column

Hi,
I am creating view in oracle 10g in which i have 1 custom column who's value are the next value of the another column.
E.g.
C 1 -----C2 ------ custom-C3
10 -------1 --------------2
10 ------ 2 ------------- 3
10 -------3 ------------- 3
11 -------1 ------------- 2
Now is there any function in oracle which gives me to generate "custom-c3"
which gives the data for next value of column 2
Thanks.

Hi Frank,
Thank you so much......its working fine in 10 g.....
but for the last row of its coming emply or null but i want value of c2 if its last value.
e.g
C 1 -----C2 ------ custom-C3
10 -------1 --------------2
10 ------ 2 ------------- 3
10 -------3 ------------- 3
11 -------1 ------------- 2
In the above the value of c1 is 10 i.e last one then value of c3 should be value of c2 i.e. 3.
Can you use IF function?
Thanks.
Message was edited by:
user650690

Similar Messages

  • Need help coping project from one computer to another.

    I need help coping project from one computer to another.  I loaded all video on computer 1, copied events and project folder to computer 2.  I was told I only needed to copy the project folder back to computer 1 since the events folder is already there.   I copied project folder back to computer 1 but the files wont open.  I dont have computer 2 available. 
    Please help!!!

    Hi
    No that's not the way to do it - iMovie gets confused and in some cases the problems might be un-repairable.
    You've got several problems
    • iMovie'08 - CAN NOT MOVE PROJCTS - You NEED iMovie'09 or iMovie'11 - I see no other working solution
    • Never MOVE or alter any folder named
    iMovie Projects - or -
    iMovie Events
    on DeskTop/Finder - This might be very harmful
    • Moving (Projects) and Events - HAS TO be done within the iMovie Application.
    You've got an Evets window and here You can view Your Events in two ways - Yearly - or - Yearly per Hard disk
    Here You can move within this "window" to another location
    • Projects - NO they do not contain Your full movie - only a document on howto use the material in Event folder
    and there might be worse if You added Photos from iPhoto and Audio from iTunes/Garageband - then You have
    to get this over to the second Mac too, to be able to continue editing.
    So to move Your projects to another Mac You need
    • iMovie'09 or 11
    • an external hard disk -
    MUST BE Mac OS Extended formatted - as UNIX/DOS/FAT32/Mac OS Exchange will not work for VIDEO
    Should be a FireWire one - as UBS/UBS2 performs badly when used for video
    • Then move/copy over within Project resp Events window in iMovie Application
    Hopefully I've been not to confusing or badly structured to be followed.
    Yours Bengt W

  • Max of one column in another column

    HI all
    I have a scenario in the WebI report where I need to get the Maximum value from one column and use that maximum value in calculation of another column for each row in that column.
    for ex:
    column A      
    1
    2
    3
    4
    5
    Max of column A [MAX]= 5
    Column B  
    1/ [MAX]
    2/[MAX]
    3/[MAX]
    4/[MAX]
    5/[MAX]
    Column B calculation is some thing like described above.
    but my issue is, in WebI values are caluclated row wise and while generating values for the first row in column B, it picks the value 1 but the MAX value is not yet caluclated and if I use Max variable it is caluculating as 1/1 for first row and 2/2 and 3/3. Instead of 1/5, 2/5, 3/5.
    Any idea please share it.
    Thanks
    Edited by: saathiyaa on Feb 19, 2011 1:23 AM

    No its not working, well actually columb B is nothing but individual value of that row divided by max of that row
    for ex:
    1/5
    2/5
    3/5
    4/5
    5/5
    But if i have formula like  COLA/MAX[A]
    it is cosidering as 1/1, 2/2, 3/3, 4/4.5/5
    becuase webi caluclates row wise, so when it is in first row you will see maximum of that column is not yet calculated so it is taking as 1/1 not 1/5.

  • 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="&#xA;" 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="&#xA;" 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

  • Need help with NULL values in Crosstables

    Hello everybody,
    I need some help with NULL values and crosstables. My issue is the following:
    I have a query (BW - MDX-Query) that gives me turnover measures for each month. In Crystal Reports I choose crosstable to display this whereby I put all month in columns and all turnover-measures in rows. Each month that has a value (measures are not empty) is chown in the crosstables rows. So far so good. The problem occures when there are month that actually have no values (measures are empty). In that case these months are not chown in columns. But I need CR to display these columns and show the value 0. How can I do that?

    Hi Frank,
    Cross tab shows the data based on your column and these column fields are grouped and based on the group it will show your summaries. 
    If there is no data for any of your group it will not display that group.  In this case you will have to create a standard report which should look like cross tab and to get zero values you need to write formulas .
    Example if you want to display Moth wise sales :
    if Month() = 01 Then
    sum() else 0
    Now this formula will check if your month is Jan, then it will sum up the values else it will display zero value. 
    This is possible only through standard report not with Cross Tab.
    Thanks,
    Sastry

  • Need help in comparing values to display correct result set

    I have a View Object and Entity I created that point to a View on my database. This view contains a complex custom query that recovers and totals all charges and fees for all properties. However, when this result set is returned I only want to display on the initial screen the Row which contains the information for the current Property selected. However, in trying to implement this I am unsure how to:
    A) Somehow get the Property Id value of the Property currently in the JSP.
    B) Get the value of the Property Id column off each Row to compare to the value obtained in A.
    (I created an exact copy of the RowSetBrowser bean named SRIRowSetBrowser and am trying to add code to control which Rows get sent off to be added to the HTML Table)
    I can not find any documentation or source for the Row class and thus have no way to know if any methods are provided that would help me.
    Any ideas?
    Thanks

    Thats a mistake while modifying the XML.
    The Element is OpenOrder:
    so the XML goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <BOOK_PURCHASE_SR xsi:schemaLocation="http://www.mobily.com/blackberry/request request.xsd"
    xmlns="http://www.mobily.com/blackberry/request"
    xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
    <SR_HEADER>
    <Name>Java</Name>
    <Book>0000</Book>
    <Price>100</Price>
    <Purchase>Y</Purchase>
    <PurchaseDate>20070902153930</PurchaseDate>
    <Requestorname>Rashmi</Requestorname>
    <RequestorLanguage>E</RequestorLanguage>
    <OpenOrder>N</OpenOrder>
    <Chargeable>Y</Chargeable>
    <ChargeAmount>99</ChargeAmount>
    </SR_HEADER>
    <PhoneNumber>1234567890</PhoneNumber>
    <Service>shop</Service>
    <Operation>purchase</Operation>
    <CustomerType>2</CustomerType>
    </BOOK_PURCHASE_SR>

  • Need Help Please: Audigy2 Value conflict with onboard sound

    <SPAN class=postbody>System info: Windows XP Home Edition, 2.4 GHz IntelPent4, 52MB of RAM; DDR 200(33MHz), MSI MS-6547 (645 Ultra) motherboard. I need help! Sigh...well I am trying to put in a Soundblaster Audigy2 into my computer. I am under the impression that I have to disable and remove all onboard sound b/c it conflicts with the new sound card, ?. I currently have onboard sound ( AC97 Audio Controller ). I went to add/remove programs and removed the AC97 from there. I also went to MyComputer/Properties/Hardware/DeviceManager/Sound,Video,andGameControllers/AC97AudioContoller and deleted it. st Question: Under DeviceManager/Sound,Video,GameControllers...Do I need to remove the Legacy Audio Drivers? I know that I have to delete the rest of the drivers for AC97 and out of chance would Legacy be those drivers? I am guessing no...Also, is there anything else that I have to delete for the on board sound program to be gone? 2nd Question: I went to BIOS, and since I have windows XP home edition I think that configuration is a little different from what I read(I wont bore you with that). So, where do I go to "disable" the onboard sound in BIOS for Windows XP HomeEdition? Also, I read something about making sure the "Chip" was disabled but I could be paranoid. Do I need to worry about that? If you made it through all that text I thank you dearly. I hope that I can get some help from someone b/c I know nothing. I am afraid of making the wrong choice on BIOS and messing everything up. Thank You so Much! Ross Message Edited by RossRude3 on 04-06-2005 0:48 AM

    Ross,
    To fully disable teh onboard audio you would need to go into the BIOS to disable the Onboard Audio chip there. The manual with your motherboard or PC should have more detail on where exactly to find this setting, as it will differ per BIOS type. Generally it should be under a heading like Integrated Peripherals, and should be marked as the Onboard Audio chip, or AC97 Audio.
    Cat

  • Need help summing row values based on several elements

    Hello All,
    I need to print two values in the trailer. The sum of all negative quantities where 1 - Trade Date is equal to settle date or record id = 2 and the sum of all position quanties with the same two conditions. Below you can see my xsl but my numbers are coming out incorrect. BTW, the results that are being parsed are coming from a database query return.
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" omit-xml-declaration="yes"/>
    <xsl:template match="/">
    <xsl:apply-templates select="result"/>
    </xsl:template>
    <xsl:template match="result">
    <xsl:apply-templates select="entry"/>
    <xsl:call-template name="trailer"/>
    </xsl:template>
    <!-- Data definition -->
    <xsl:template match="entry">
    <!-- Acct # -->
    <xsl:value-of select="substring(ClientAccountNumber, 1, 6)"/>
    <!-- Trade Date -->
    <xsl:value-of select="substring(TRADE_DATE, 3, 6)"/>
    <!-- Settle Date -->
    <xsl:value-of select="substring(SettleDate, 3, 6)"/>
    <!-- Quantity -->
    <xsl:value-of select='format-number(NetQuantity, "0000000000000.0000")
    <!-- Record Id -->
    <xsl:value-of select="RecordId"/>
    </xsl:template>
    <!-- Trailer definition -->
    <xsl:template name="trailer">
    <xsl:value-of select="count(//entry[NetQuantity>0 and TRADE_DATE = SettleDate or TRANS_REC_ID_C ='02'])"/>
    <xsl:value-of select='format-number(sum(//entry[./LongQuantity>0][./TRADE_DATE = SettleDate][./TRANS_REC_ID_C<3]/LongQuantity), "0000000000000.0000")'/>
    <xsl:with-param name="padVar" select='format-number(sum(//entry[./ShortQuantity>0][./TRADE_DATE = SettleDate][./TRANS_REC_ID_C<3]/ShortQuantity), "0000000000000.0000")'/>
    </xsl:template>

    Hello All,
    I need to print two values in the trailer. The sum of all negative quantities where 1 - Trade Date is equal to settle date or record id = 2 and the sum of all position quanties with the same two conditions. Below you can see my xsl but my numbers are coming out incorrect. BTW, the results that are being parsed are coming from a database query return.
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" omit-xml-declaration="yes"/>
    <xsl:template match="/">
    <xsl:apply-templates select="result"/>
    </xsl:template>
    <xsl:template match="result">
    <xsl:apply-templates select="entry"/>
    <xsl:call-template name="trailer"/>
    </xsl:template>
    <!-- Data definition -->
    <xsl:template match="entry">
    <!-- Acct # -->
    <xsl:value-of select="substring(ClientAccountNumber, 1, 6)"/>
    <!-- Trade Date -->
    <xsl:value-of select="substring(TRADE_DATE, 3, 6)"/>
    <!-- Settle Date -->
    <xsl:value-of select="substring(SettleDate, 3, 6)"/>
    <!-- Quantity -->
    <xsl:value-of select='format-number(NetQuantity, "0000000000000.0000")
    <!-- Record Id -->
    <xsl:value-of select="RecordId"/>
    </xsl:template>
    <!-- Trailer definition -->
    <xsl:template name="trailer">
    <xsl:value-of select="count(//entry[NetQuantity>0 and TRADE_DATE = SettleDate or TRANS_REC_ID_C ='02'])"/>
    <xsl:value-of select='format-number(sum(//entry[./LongQuantity>0][./TRADE_DATE = SettleDate][./TRANS_REC_ID_C<3]/LongQuantity), "0000000000000.0000")'/>
    <xsl:with-param name="padVar" select='format-number(sum(//entry[./ShortQuantity>0][./TRADE_DATE = SettleDate][./TRANS_REC_ID_C<3]/ShortQuantity), "0000000000000.0000")'/>
    </xsl:template>

  • Compare column to another column with a specific value?

    What i need to do is compare a column that holds the SiteNames of holidays to another column with the DifficultyDescription of holidays.
    I want to show that sites that are not included in boldANY*bold* holiday with an “easy” or “moderate” rating.
    Some of my SiteNames have holidays with different difficulty ratings....
    e.g Yellowstone National Park(SiteName) - H2 - Moderate(DifficultyDescrip)
    Yellowstone National Park(SiteName - H3 - Strenuous(DifficultyDescrip)
    In this example i would want Yellowstone not to be in the results of my query as one of its results is 'moderate'.
    I want to show holidays that are not in boldANY*bold* holiday with 'easy' or 'moderate'
    Here is my attempt so far...
    select it220_holdet.holcode.holcode as holcode
             it220_holdet.diffdetails.diffdescrip as diffdescrip
             it220_sitedetails.sitename as sitename
    from it220_holidaydetails it220_holidaydetails,
    etc....
    where it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Easy' <<<< where the sitename is not equal to a difficulty description of 'Easy'
    and     it220_sitedetails.sitename != it220_diffdetails.diffdescrip = 'Moderate' <<<< where the sitename is not equal to a difficulty description of 'Moderate'
    Is the logic of this correct? The error message i am getting is SQL command not properly ended.
    Is this more of a syntax problem than logic. Any help would be great.
    Thanks in advance!
    Edited by: Jay on 19-Nov-2010 02:47
    Edited by: Jay on 19-Nov-2010 02:47

    Hi,
    Ok,
    Problem is in this part of query
    where   "IT220_HOLIDAYDETAILS"."DIFFRATING"="IT220_DIFFDETAILS"."DIFFCODE"
    and      "IT220_HOLIDAYDETAILS"."HOLCODE"="IT220_LOOKUP_SITEHOLIDAY"."HOLCODE"
    and      "IT220_LOOKUP_SITEHOLIDAY"."SITECODE"="IT220_SITEDETAILS"."SITECODE"
    and "IT220_SITEDETAILS"."SITENAME" = "IT220_DIFFDETAILS"."DIFFDESCRIP"
    and "IT220_SITEDETAILS"."SITENAME" =  "IT220_DIFFDETAILS"."DIFFDESCRIP"
    Check are you joining correct columns.
    And remove possibility that tables values are in different cases
    SELECT "IT220_HOLIDAYDETAILS"."HOLCODE" AS "HOLCODE",
      "IT220_HOLIDAYDETAILS"."COUNTRYVIS"   AS "COUNTRYVIS",
      "IT220_DIFFDETAILS"."DIFFDESCRIP"     AS "DIFFDESCRIP",
      "IT220_SITEDETAILS"."SITENAME"        AS "SITENAME"
    FROM "IT220_SITEDETAILS" "IT220_SITEDETAILS",
      "IT220_LOOKUP_SITEHOLIDAY" "IT220_LOOKUP_SITEHOLIDAY",
      "IT220_DIFFDETAILS" "IT220_DIFFDETAILS",
      "IT220_HOLIDAYDETAILS" "IT220_HOLIDAYDETAILS"
    WHERE UPPER("IT220_HOLIDAYDETAILS"."DIFFRATING")  = UPPER("IT220_DIFFDETAILS"."DIFFCODE")
    AND UPPER("IT220_HOLIDAYDETAILS"."HOLCODE")       = UPPER("IT220_LOOKUP_SITEHOLIDAY"."HOLCODE")
    AND UPPER("IT220_LOOKUP_SITEHOLIDAY"."SITECODE")  = UPPER("IT220_SITEDETAILS"."SITECODE")
    AND UPPER("IT220_SITEDETAILS"."SITENAME")         = UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP")
    AND UPPER("IT220_DIFFDETAILS"."DIFFDESCRIP") NOT IN('EASY','MODERATE')Regards,
    Jari

  • Copy from column  to another column in same table

    Hi,
    Working on EBS Version : 11.5.10.2
    Table Name : ASO_QUOTE_HEADERS_ALL
    COLUMNS :
    QUOTE_STATUS_ID NUMBER
    ATTRIBUTE6 VARCHAR2(240 BYTE);
    Need to copy from quote_status_id to attribute6 for that quote_header_id
    example if quote_status_id = 10 then it should copy in attribute6 = 10 for quote_header_id = 69312
    again if changed to quote_status_id = 10077 then it should replace with attribute6 = 10077
    for quote_header_id = 69312
    i wrote a procedure posted below:
    CREATE OR REPLACE procedure SLC_STATUS_CAPTURE (p_quote_header_id IN number) is
    BEGIN
    UPDATE aso_quote_headers_all SET attribute6 = quote_status_id
    WHERE quote_header_id = p_quote_header_id;
    end SLC_STATUS_CAPTURE;
    then calling this trigger through table level
    BEGIN
    SLC_STATUS_CAPTURE(:OLD.QUOTE_HEADER_ID);
    END;
    it is giving an error.
    Please i need some help.
    Thanks and Regards
    Vijay

    John Spencer wrote:
    As others have mentioned, you cannot change column values in a statement level trigger. Also, you cannot
    update the table that the trigger is firing on. If I understand correctly, you want to copy the value of
    quote_status_id into attribute6 whenever a row is inserted or updated. If that is correct, then you only need a simple trigger like:
    create trigger trigg
    before insert or update of aso_quote_headers_all
    for each row
    begin
    :new.attribute6 = :new.quote_status_id;
    end;Thought why anybody would want to do this is beyond me - you already have the info
    in your attribute6 column - what's the point in simply copying it to another column in
    the same table?
    Paul...
    John

  • How to place one column under another column in obiee report?

    Hi all,
    I am new to obiee, so need some help from obiee experts. Can anyone tell me how to place one column data under another column in obiee report?
    i need the report to be as below
    category total_students Course_enrollment Test_attended pass_test
    total N % N % N %
    all students ##### ## ## ## ## ## ##
    Ethnicity
    Asian ###### ## ## ## ## ## ##
    African American ###### ## ## ## ## ## ##
    white ######
    Filipino ######
    Gender
    Male ##### ## ## ## ## ## ##
    Female ##### ## ## ## ## ## ##
    and similarly for other columns
    where ethnicity, gender are columns in the table and Course_enrollment, Test_attended, pass_test are calculated columns.
    Please help me to create a report as above if anyone knows how to do it.
    Edited by: Shailaja on Jul 19, 2010 12:23 AM

    Two ideas I can think of:
    1) Create multiple pivot tables and then display them one under the other
    2) Create multiple measure columns such as "male_amt", "female_amt", "white_amt", "asian_amt", "black_amt", etc. for all the columns you need. Then you could simple stack them in a single pivot table.
    Option #2 might give you the prettiest results - but also requires a lot more maintenance (for instance, if you reclassify ethnic groups, you'd have to go through the reports to add additional metric columns).
    Hope this helps,
    Scott

  • Copy the data from one column to another column using @

    I have two columns here - A and B.
    Column A has a complicated formula that will generate results. I wanted the results in Column A to be reflected in Column B without pasting the A's formula in B. This will save me the trouble of editing formulas in more than 1 column if there is a need.
    I saw somewhere that you can use "@" in column B but I have no idea how to use it.
    Assumingly column A is the first column. I tried to insert '@1' in B's formula and change B's column properties' Data Format as "Treat Text as HTML". It does not work.
    Please advise how I can do that.

    So is there any way to copy the data in Column A into Column B without putting the same formula? something like in Excel where we put "=C1". Its not possible in BI as it comes in excel.....The only way is to create a duplicate column in RPD or Answers screen and incorporate the formula and giving different name to it.
    whats the problem if you duplicate the column with same formula?....Ok still if you dont want to see identical just write some pseudo logic say
    Duplicated column f(x) case when 1=0 then column_name else formula end.....so it appears different to see but it outputs same.
    UPDATED POST
    Dont create in RPD,you can create a dummy column in that report request and change the f(x) to the above case i mentioned by taking the column from columns button in edit formula screen so when ever you edit the actual column formula that would reflect in the dummy column also as it is replicating from original one.Try and see
    hope helps you.
    Cheers,
    KK
    Edited by: Kranthi.K on Jun 2, 2011 1:26 AM

  • SQL update one column from another column

    I'm looking for a way to update a SQL column with a portion
    of info from another column in the same table.
    example of a sql command
    UPDATE table1
    SET table1.columnname1 = table1.columnname2
    FROM table
    WHERE blah blah blah
    Here's the thing... I only need a portion of the data found
    in the source column. I'm not sure how I would do this then.
    for example, the database has countries and states combined
    into one column like this 'US-DC', 'US-CA', US-FL', etc. I want to
    separate these into two columns, a country column and a state
    column.... and I dont want to go though all the results and do this
    line by line. How would I write the SQL command so that it puts
    just the country in the country column, and puts just the state in
    the state column, and it omits the dash all together.
    any ideas?

    It depends. Are you using PHP and mySQL or ASP and SQL?
    If you are using mysql and PHP you could use the following
    code to loop through all records in your datatbase.
    $sql="SELECT * FROM tablename"; //SET tablename to the name
    of your database table.
    $result=mysql_query($sql)or die(mysql_error(). " - $sql");
    for($x = 0; $row=mysql_fetch_assoc($result); $x++){
    //set up the variables from the table
    $ID=$row['ID']; //this is the primary key
    $var1=$row['contrystatecolumn']; //this is the name of the
    column which holds the country-state
    $var2=explode("-", $var1); //now we explode the string to get
    the country and the state seperated and place the results into an
    array
    $country=$var2[0]; //this is the first piece of the exploded
    string in the array
    $state=$var2[1]; //this is the second piece of the exploded
    string in the array
    //now we update the database record with the new information
    //remember to replace the tablename with your actual table
    name and the columns country and state with the acutal names of
    your columns in your table
    $sql2="UPDATE tablename SET country='$country'.
    state='$state' WHERE ID='$ID'";
    $result2=mysql_query($sql2)or die(mysql_error() . " -
    $sql2");
    This code will loop through every record in your table and do
    what you want very quickly.
    Hope this helps
    Stan Forrest
    Senior Web Developer
    ATG Internet

  • Need help in extracting value from an xml tag.

    Hi ALL,
    Good Morning to all, i have problem in fetching a value from a xml tag. I have created a xml schema based on the schema i have created a xmltype table and inserted a value to the table. When i am trying to fetch a value from a particular tag i am unable to do so.. Kindly help me to solve this. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml.xsd"
    version="1.0">
    <element name="Field1">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>          
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable1 (
    id number, XMLDATA XmlType)
    XMLTYPE XMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml.xsd"
    ELEMENT "Field1";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable VALUES(
    xmltype.createxml('<?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    </samp:Field1>'));
    To show the data as a field with structure:
    1. Query:
    Select * from chipsxmltable1;
    Output:
    ID XMLDATA
    1 <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    2. Query: (Both the query displays the same Output)
         SELECT X.xmldata.getClobVal() "XMLDATA" FROM chipsxmltable1 X;
         select extract(XMLDATA, '/Field1').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    XMLDATA
    <?xml version="1.0"?>
    <samp:Field1 xmlns:samp="http://www.oradev.com/chipsxml.xsd">
    <UTI>
    <U01>No</U01>
    <U02>No</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>
    <U04>Y</U04>
    <U05>Y</U05>
    </UTI>
    </samp:Field1>
    To show the data as a single string without structure using "getstringval()":
    3. Query
         select extract(XMLDATA, '//text()').getstringval() "CHIPS - XML" from chipsxmltable1 x;
    OUtput:
    CHIPS - XML
    NoNoYYYYYY
    To show the data as a single string without structure using "getclobval()":
    4.Query
         select extract(XMLDATA, '//text()').getClobVal() "CHIPS - XML" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    NoNoYYYYYY
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACT" function:
    6.Query:
         select extract(XMLDATA, '/Field1/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01').getstringval() "XMLDATA" from chipsxmltable1 x;
         select extract(XMLDATA, '/Field1/UTI/U01/text()').getstringval() "XMLDATA" from chipsxmltable1 x;
    Output:
    CHIPS - XML
    The above queries are not fetching the value.
    To show the data in a particular tag with/Without structure (Which is not working) using "EXTRACTVALUE" function:
    7. Query:
         select extractValue(XMLDATA, '/Field1/UTI') "XMLDATA" from chipsxmltable1 x;
         select extractValue(XMLDATA, '/Field1/UTI/U01') "XMLDATA" from chipsxmltable1 x;
    Output:
    X
    The above queries are not fetching the value.
    My question is:
    How to fetch values from xml tag when the value are inserted through xml schema?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    You need to declare the namespace of each element used in the XPath expression, like this :
    SQL> select extractvalue( XMLDATA
      2                     , '/samp:Field1/UTI/U01'
      3                     , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
      4  from chipsxmltable1 x
      5  ;
    XMLDATA
    No
    SQL> select extract( XMLDATA
      2                , '/samp:Field1/UTI'
      3                , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
      4                ).getstringval() "XMLDATA"
      5  from chipsxmltable1 x
      6  ;
    XMLDATA
    <UTI>
      <U01>No</U01>
      <U02>Y</U02>
      <U03>Y</U03>
      <U03a>Y</U03a>
      <U03b>Y</U03b>
      <U03c>Y</U03c>
      <U04>Y</U04>
      <U05>Y</U05>
    </UTI>
    Please see EXTRACT and EXTRACTVALUE documentation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions051.htm#i1006712
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions052.htm#SQLRF06173
    BTW, "XMLDATA" is a pseudo-column used by Oracle. I don't know if it'll ever cause any conflict but maybe you should rename your column.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256
    Regards.

  • I need help passing a value to a method.

    Im fairly new to java.
    I have this JSP that i would like to ultimately write it as a servlet. So if any one can help out with this as well, that would be great.
    There's a code snippet at the bottom of my code that looks like this
            String operation = request.getParameter("actionMethod");
         String areaId = request.getParameter("areaId");
         List list = listOrders();I was wondering how i could pass the areaId value to the listOrders. That way i could use that to modify my sql depending on what areaid was selected.
    here's a copy of my code.
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <%@ page import="com.fins.gt.server.*"%>
    <%@ page import="com.fins.gt.util.*"%>
    <%!
         // Eventually needs re-written as a servlet
         Connection getConnection(){
              String url="jdbc:as400://bigblue";
              Connection conn= null;
              try{
                   Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();
                   conn = DriverManager.getConnection(url,"prodtasv","prodtasv");
              }catch(Exception e){
              return conn;
         void closeConnection(Connection conn){
              try{
                   conn.close();
              }catch(Exception e){
         List listOrders(){
            Connection conn = getConnection();
            if(conn==null)
                    return new ArrayList();
            Statement stmt = null;
            ResultSet rs = null;
            List list = new ArrayList();
            try{
                 stmt = conn.createStatement();
                 rs = stmt.executeQuery("SELECT * FROM AIMDATA.DVCR_AREA_LOOKUP");
                 while(rs.next()){
                        Map map = new HashMap();
                        map.put("AREAID",new Long(rs.getLong("AREAID")));                    
                        map.put("SICD",rs.getString("SICD"));
                        map.put("SKCD",rs.getString("SKCD"));
                        map.put("DESCRIPTION",rs.getString("DESCRIPTION"));
                        list.add(map);
                 rs.close();
                 stmt.close();
            }catch(Exception e){
            closeConnection(conn);
            return list;
    %>
    <%
         // GridServerHandler is server side wrapper, you can get all the info posted to server in your Java way instead of JavaScript
         GridServerHandler gridServerHandler=new GridServerHandler(request,response);
         String operation = request.getParameter("actionMethod");
         if("save".equals(operation)){
         }else { //client is retrieving data
              List list = listOrders();
             //get how many records we are sending
              int totalRowNum= list.size();
              gridServerHandler.setTotalRowNum(totalRowNum);
              //if you would like paginal output on server side, you may interested in the following 4 methods
              // gridServerHandler.getStartRowNum() first record no of current page
              // gridServerHandler.getEndRowNum() last record no of current page
              // gridServerHandler.getPageSize() how many records per page holds
              // gridServerHandler.getTotalRowNum() how many records in total
              // we take map as this sample, you need to use gridServerHelp.setData(list,BeanClass.class); to deal with bean
              gridServerHandler.setData(list);
                // gridServerHandler.setException("your exception message");
              //print out JSON string to client
              out.print(gridServerHandler.getLoadResponseText());          
              //you could get the posted data by calling gridServerHandler.getLoadResponseText() and obtain more flexibility, such as chaning contentType or encoding of response.
    %>

    Sorry i uploaded the wrong code and the edit wasn't working for me.
    <%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <%@ page import="com.fins.gt.server.*"%>
    <%@ page import="com.fins.gt.util.*"%>
    <%!Connection getConnection() {
              String url = "jdbc:as400://bigblue";
              Connection conn = null;
              try {
                   Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance();
                   conn = DriverManager.getConnection(url, "prodtasv", "prodtasv");
              } catch (Exception e) {
              return conn;
         void closeConnection(Connection conn) {
              try {
                   conn.close();
              } catch (Exception e) {
         List listOrders() {
              Connection conn = getConnection();
              if (conn == null)
                   return new ArrayList();
              Statement stmt = null;
              ResultSet rs = null;
              List list = new ArrayList();
              try {
                   stmt = conn.createStatement();
                   rs = stmt
                             .executeQuery("SELECT * FROM AIMDATA.DVCR_DETAIL WHERE AREAID = 1");
                   while (rs.next()) {
                        Map map = new HashMap();
                        map.put("DETAILID", new Long(rs.getLong("DETAILID")));
                        map.put("AREAID", new Long(rs.getLong("AREAID")));
                        map.put("DVCRID", new Long(rs.getLong("DVCRID")));
                        map.put("DEFECTID", new Long(rs.getLong("DEFECTID")));
                        map.put("DESCRIPTION", rs.getString("DESCRIPTION"));
                        map.put("WRNO", new Long(rs.getLong("WRNO")));
                        map.put("WRLINENO", new Long(rs.getLong("WRLINENO")));
                        list.add(map);
                   rs.close();
                   stmt.close();
              } catch (Exception e) {
              closeConnection(conn);
              return list;
         }%>
    <%
         // GridServerHandler is server side wrapper, you can get all the info posted to server in your Java way instead of JavaScript
         GridServerHandler gridServerHandler = new GridServerHandler(
                   request, response);
         String operation = request.getParameter("actionMethod");
         String areaId = request.getParameter("areaId");
         List list = listOrders();
         //get how many records we are sending
         int totalRowNum = list.size();
         gridServerHandler.setTotalRowNum(totalRowNum);
         // we take map as this sample, you need to use gridServerHelp.setData(list,BeanClass.class); to deal with bean
         gridServerHandler.setData(list);
         // gridServerHandler.setException("your exception message");
         //print out JSON string to client
         out.print(gridServerHandler.getLoadResponseText());
         //you could get the posted data by calling gridServerHandler.getLoadResponseText() and obtain more flexibility, such as chaning contentType or encoding of response.
    %>

Maybe you are looking for