Get millisecond values from timestamp column in v$logmnr_contents

Hello
How do we get millisecond values from timestamp column in v$logmnr_contents.
I tried with following query.
select scn,To_Char(timestamp,'DD-MON-YYYY HH24:MI:SS:FF') from v$logmnr_contents WHERE OPERATION NOT IN('START') and username ='SCOTT' and sql_redo is not null and (seg_owner is null or seg_owner not in('SYS'));
it says ORA-01821: date format not recognized. I want to find the relation of scn with timestamp. In forums i found, scn is derived from timestamp value. I dont know its correct or not.
if i query with out FF in time format i get like
scn timestamp
808743 27-NOV-2007 00:12:53
808743 27-NOV-2007 00:12:53
808743 27-NOV-2007 00:12:53
808744 27-NOV-2007 00:12:53
808744 27-NOV-2007 00:12:53
808744 27-NOV-2007 00:12:53
if scn is derived from timestamp with milliseconds, each scn should be different right?More help please

May be there's an easy way solving your problem, I did it like that:
CREATE TABLE quota_test (test VARCHAR2(50))
INSERT INTO quota_test
VALUES ('update "SCOTT"."NEWTAB1" set a="34" and b="45"')
SELECT test normal, REPLACE(SUBSTR(test,INSTR(test,'"',1),INSTR(test,'.',1)+2),'"','') changed
FROM quota_test
Result is :
NORMAL
update "SCOTT"."NEWTAB1" set a="34" and b="45"      
CHANGED
SCOTT.NEWTAB1
If you didn't understand, I can explain what I wrote

Similar Messages

  • How to get a value from a column inside a table

    Hi,
    I have got the following problem. I have got a table with some data inside. And a new column, which is not in the dataprovider. Now i search for an opportunity to go through the rows of the table and check the value of this column. I cant do this with the dataprovider or the rowset. My question is now how can i do this? The table object doesnt seem to have a corresponding method.
    Thanks in advance for help
    Acinonyx

    this is some code you can use (based on Winston's and others' tips):
    put this in you page bean:
    private HashSet selectedRows = new HashSet();
    public boolean isSelected() {
    TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow");
    if (trdp == null) {
    return false;
    RowKey rowKey = trdp.getTableRow();
    if (this.selectedRows.contains(rowKey.getRowId()))
    return true;
    else
    return false;
    public void setSelected(boolean b) {
    TableRowDataProvider trdp = (TableRowDataProvider)getBean("currentRow");
    RowKey rowKey = trdp.getTableRow();
    if (checkbox1.isChecked()) {
    this.selectedRows.add(rowKey.getRowId());
    Object v = this.t_fotoDataProvider.getValue("fieldName", rowKey);
    } else {
    this.selectedRows.remove(rowKey.getRowId());
    and then bind the "selected" property of the checkbox column to the "selected" property of the page bean.
    Now, eveytime the page is submitted, you can do something useful, for example, in the setSelected() method (the row that starts with Object v = ... get's the value of some field corresponding to the checked row)
    Mauro

  • Getting unique values from a column within a hierarchy

    I'm sort of new to working with databases and oracle so this is probably a beginner-ish question. I'm using oracle 9i on this.
    I have a database that contains a table with an organizational hierarchy (dept_id, dept_name, parent_id), and another that contains a list of items for each department (like dept_id, item_id). Item_id joins with another table for the actual description of the items. Each department may have many items, and the departments may overlap with the items included in each.
    I only want to contain that item list for leaf nodes in the hierarchy and for any departments that are not at the bottom, have a query pull a list of all unique items contained by its children, without the overlap. I know I can use START WITH and CONNECT BY to traverse the hierarchy but I'm not sure how I'd put all these pieces together into one query to get what I want, so I'd really appreciate help.

    can you pls post a sample data and the output you are looking for.

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • 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

  • To get date values from a varchar column

    hi,
    i got an errorin oracle reports 6i
    actually my problem is my client used dff so when we enter data from front end tht data is storing in attribute columns in backend.nw i want to build a report by using the dates as parameters. i result must be in between the dates i hv mentioned. for giving runtime parameters i must take values from attribute column. tht column is varchar.
    i tried
    to_date(nvl(columnname,'01-JAN-2000'),'DD-MON-YY')between :p_from_date and :p_to_date
    i got error non numeric is found where numeric expeted and if i change format i got invalid month
    i used trim then i didnt get error but i got wrong data
    nVL(TRIM(columnname),'01-JAN-51') BETWEEN TRIM(:P_FROM_DATE) AND TRIM(:P_TO_DATE)
    so please help me
    im new to this oracle apps also.
    thanks in advance,
    radha

    --columnname,'01-JAN-2000'),'DD-MON-YY')
    This doesn't seem to be correct your format is 01-JAN-2000, however the date format you pass is DD-MON-YY

  • Get value from table column

    Hi,
    I am new to OAF, I am trying to get the value from the table in order to make validation. I have the following PG:
    SearchResultsTableRN
    itemRow
    DetailsCell
    DetailsTableLayout
    ShortDescRow
    ShortDescCell
    ShortDesc
    LongDescRow
    LongDescCell
    LongDesc
    AttributesRow
    AttributesCell
    AttributesTableLayout
    Attributes1Row
    Attribute11Cell
    ect...
    Can anyone help me please in how to go into the table --> row --> column to retrieve the value from a specific column?
    If their is a document or example that can help I will appreciate it. Since I tried searching in devguide and didn't find any results.
    Note: I am extending the controller and reached till the following code:
    public void processFormRequest(OAPageContext oapageContext, OAWebBean webBean){
    super.processFormRequest(oapageContext, webBean);
    String event = oapageContext.getParameter("ShortDescRow");
    OATableBean advtable = (OATableBean)webBean.findChildRecursive("SearchResultsTableRN");
    OARowBean rowtbl = (OARowBean)advtable.findChildRecursive("DetailsCell");
    String message = "test:"+event+"|"+advtable+"|"+"|"+"|"+"|";
    throw new OAException(message, OAException.INFORMATION);
    Thanks and Regards
    Patrick

    Patrick,
    My first advice would be go through OAF guide and do tutorial examples, for such basic details.
    If ur talking about tablelayout region
    u can use pageContext.getParameter(<Item id of UIX bean whose value u want>);
    If you are talking about table
    You can Iterate through the VO based on primary key ...on which the table is based, and retrive the corresponding Vo attribute value.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Getting the Values from a Tiled View

    Hi,
    I have a TiledView and I have checkbox in the tiled view. I am trying
    to get the values of the checked boxes.
    I have coded like this.
    Object[] links = getRSystemLinks().getCbSystemUrl().getValues();
    if I see the links.length i get only one. In html If I see the code
    it appends the TileIndex in brackets. If I replace the TileIndex with
    0 in all the fields in endCbSystemUrl method I get the correct values.
    In the TiledView beginDisplay() method my code is like this.
    if (getPrimaryModel() == null) throw new ModelControlException
    ("Primary model is null");
    super.beginDisplay();
    resetTileIndex();
    pgCustomizeLinksViewBean parentBean = (pgCustomizeLinksViewBean)
    getParent();
    ((DatasetModel) getDefaultModel()).setSize
    (parentBean.SystemChoicesValue.size());
    Any Suggestions on this.
    Thanks
    Namburi

    Namburi--
    Remember, the getValues() method does not return the values from a column in
    a TiledView. It is strictly for use by fields that can have multiple
    values, like multi-select list boxes.
    DO NOT remove the indexing feature from the field names, especially in the
    case of checkboxes, because checkboxes aren't submitted back to the server
    unless they are checked. By overriding the automatic checkbox tracking
    feature JATO provides, you won't be able to tell which checkboxes were
    actually checked by row--you'll simply get back a list the same size as the
    number of checkboxes that were checked, without any placeholders for the
    ones that weren't checked.
    Instead, on submit, you simply need to move through the tiledView and check
    the value of checkbox on each row:
    tiledView.beforeFirst();
    while (tiledView.next())
    if (getDisplayFieldBooleanValue("myCheckBox"))
    You can use the same construct to build up an array or list:
    List checkedList=new LinkedList();
    tiledView.beforeFirst();
    while (tiledView.next())
    if (getDisplayFieldBooleanValue("myCheckBox"))
    checkedList.add(new Boolean(true))
    else
    checkedList.add(new Boolean(false))
    Todd
    Todd Fast
    Senior Engineer
    Sun Microsystems, Inc.
    todd.fast@s...
    ----- Original Message -----
    From: <vnamboori@y...>
    Sent: Wednesday, October 17, 2001 3:49 PM
    Subject: [iPlanet-JATO] Getting the Values from a Tiled View
    Hi,
    I have a TiledView and I have checkbox in the tiled view. I am trying
    to get the values of the checked boxes.
    I have coded like this.
    Object[] links = getRSystemLinks().getCbSystemUrl().getValues();
    if I see the links.length i get only one. In html If I see the code
    it appends the TileIndex in brackets. If I replace the TileIndex with
    0 in all the fields in endCbSystemUrl method I get the correct values.
    In the TiledView beginDisplay() method my code is like this.
    if (getPrimaryModel() == null) throw new ModelControlException
    ("Primary model is null");
    super.beginDisplay();
    resetTileIndex();
    pgCustomizeLinksViewBean parentBean = (pgCustomizeLinksViewBean)
    getParent();
    ((DatasetModel) getDefaultModel()).setSize
    (parentBean.SystemChoicesValue.size());
    Any Suggestions on this.
    Thanks
    Namburi
    [email protected]

  • Retrieving multiple values from one column in SELECT statement

    Hi,
    I have a slight dilemma in that I'm trying to pull down all the values from a column from a select statement that includes some JOINS in it.
    If I run the query at the SQL Plus prompt, it pulls back all the values/rows.
    When I run the select (and prepared ) statement in my JSP, it only pulls back one of the 4 values I'm trying to retrieve.
    e.g.
    at the DB level :
    SELECT role_name, CC_ID FROM votetbl a
    INNER JOIN APPROVERS b ON
    a.BUSVP = b.BUSVP AND
    a.BRANCH = b.BRANCH
    WHERE CC_ID = 1688this will return:
    ROLE_NAME CC_ID
    ops 1688
    ops 1688
    comply 1688
    legal 1688
    comply 1688
    When run in my JSP, like so:
    String primID3a = request.getParameter("primID");
    Statement stmtovoter = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    String prepvotSQL = "SELECT role_name, CC_ID FROM votetbl a INNER JOIN APPROVERS b ON a.BUSVP = b.BUSVP AND " +
                         "a.BRANCH = b.BRANCH WHERE CC_ID = ?";
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    out.println("Vote category: "+votecat);I only get ops returned.
    Do I need to run an enumerator? Or reqest.getParameterValues or use a while statement around the results set?
    Any feedback and direction here is welcomed!
    Thanks!

    Actually, I tried looping and still only get 1, but returned several times.
    i.e.
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    while (rest3.next()) {
    out.print("category roles "+votecat);
    }then I get returned the following:
    admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admin
    like so.
    Where as at the DB level I get
    ROLE_NAME CC_ID
    admin 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    risk 1688
    comply 1688
    legal 1688
    legal 1688
    ops 1688
    comply 1688
    Maybe the while should go around the getString(1) designation? But I was thinking I'd tried that and gotten invalid cursor error
    Something is definitely amiss, between the prepared statement in the servlet and the SELECT statement at the DB level.
    I can totally hardcode the statement in the servlet or JSP and it will return one value potentially several times, but only one.
    Other times, it will not return a value at all, even though one resides in the db.
    Yet go to the DB/SQL Plus prompt and it returns perfectly. I can simply copy and paste the SELECT statement from the out.print line I made and it works like a champ in SQL Plus. Any ideas why the same exact thing cannot return the proper values within the servlet/JSP?
    Yeeeeeeesh!!! : (
    Message was edited by:
    bpropes20

  • NullPointerException - Cannot get the value from variable f_cashGiven

    In SubCheckout.java (a POS), what I want is when Payment button (f_cashPayment) is pressed, the action "Cash" is performed, get the value from Cash Given (f_cashGiven), do the subtraction and post the value as Cash Return (f_cashReturn). The code is filled in actionPerformed. But I cannot get the value by using f_cashGiven.getValue() from VNumber class. It returns NULL. This should be quite straight forward, but I do not know what is wrong. Please help!
    Enclosed please find the source code of SubCheckout.java and VNumber.java
    This is the code of SubCheckout.java :
    * The contents of this file are subject to the   Compiere License  Version 1.1
    * ("License"); You may not use this file except in compliance with the License
    * You may obtain a copy of the License at http://www.compiere.org/license.html
    * Software distributed under the License is distributed on an  "AS IS"  basis,
    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
    * the specific language governing rights and limitations under the License.
    * The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
    * Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
    * are Copyright (C) 1999-2005 Jorg Janke.
    * All parts are Copyright (C) 1999-2005 ComPiere, Inc.  All Rights Reserved.
    * Contributor(s): ______________________________________.
    package org.compiere.pos;
    import java.awt.*;
    import java.awt.event.*;
    import java.math.BigDecimal;
    import javax.swing.border.*;
    import org.compiere.grid.ed.*;
    import org.compiere.swing.*;
    import org.compiere.util.*;
    *     POS Checkout Sub Panel
    *  @author Jorg Janke
    *  @version $Id: SubCheckout.java,v 1.3 2005/03/11 20:28:22 jjanke Exp $
    public class SubCheckout extends PosSubPanel implements ActionListener
          *      Constructor
          *     @param posPanel POS Panel
         public SubCheckout (PosPanel posPanel)
              super (posPanel);
         }     //     PosSubCheckout
         private CButton f_register = null;
         private CButton f_summary = null;
         private CButton f_process = null;
         private CButton f_print = null;
         private CLabel f_lcreditCardNumber = null;
         private CTextField f_creditCardNumber = null;
         private CLabel f_lcreditCardExp = null;
         private CTextField f_creditCardExp = null;
         private CLabel f_lcreditCardVV = null;
         private CTextField f_creditCardVV = null;
         private CButton f_cashPayment = null;
         private CLabel f_lcashGiven = null;
         private VNumber f_cashGiven = null;
         private CLabel f_lcashReturn = null;
         private VNumber f_cashReturn = null;
         private CButton f_creditPayment = null;
         /**     Logger               */
         private static CLogger log = CLogger.getCLogger(SubCheckout.class);
          *      Initialize
         public void init()
              //     Title
              TitledBorder border = new TitledBorder(Msg.getMsg(Env.getCtx(), "Checkout"));
              setBorder(border);
              //     Content
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              gbc.insets = INSETS2;
              //     --     0
              gbc.gridx = 0;
              f_register = createButtonAction("Register", null);
              gbc.gridy = 0;
              add (f_register, gbc);
              f_summary = createButtonAction("Summary", null);
              gbc.gridy = 1;
              add (f_summary, gbc);
              f_process = createButtonAction("Process", null);
              gbc.gridy = 2;
              add (f_process, gbc);
              f_print = createButtonAction("Print", null);
              gbc.gridy = 3;
              add (f_print, gbc);
              //     --     1 -- Cash
              gbc.gridx = 1;
              gbc.gridheight = 2;
              gbc.fill = GridBagConstraints.BOTH;
              gbc.weightx = .1;
              CPanel cash = new CPanel(new GridBagLayout());
              cash.setBorder(new TitledBorder(Msg.getMsg(Env.getCtx(), "Cash")));
              gbc.gridy = 0;
              add (cash, gbc);
              GridBagConstraints gbc0 = new GridBagConstraints();
              gbc0.insets = INSETS2;
              gbc0.anchor = GridBagConstraints.WEST;
              f_lcashGiven = new CLabel(Msg.getMsg(Env.getCtx(),"CashGiven"));
              cash.add (f_lcashGiven, gbc0);
              f_cashGiven = new VNumber("CashGiven", false, false, true, DisplayType.Amount,
                   Msg.translate(Env.getCtx(), "CashGiven"));
              f_cashGiven.addActionListener(this);
              f_cashGiven.setColumns(10, 25);
              cash.add (f_cashGiven, gbc0);
              f_cashGiven.setValue(Env.ZERO);
              f_lcashReturn = new CLabel(Msg.getMsg(Env.getCtx(),"CashReturn"));
              cash.add (f_lcashReturn, gbc0);
              f_cashReturn = new VNumber("CashReturn", false, true, false, DisplayType.Amount,
                   "CashReturn");
              f_cashReturn.setColumns(10, 25);
              cash.add (f_cashReturn, gbc0);
              f_cashReturn.setValue(Env.ZERO);
              f_cashPayment = createButtonAction("Payment", null);
              f_cashPayment.setActionCommand("Cash");
              gbc0.anchor = GridBagConstraints.EAST;
              gbc0.weightx = 0.1;
              cash.add (f_cashPayment, gbc0);
              //     --     1 -- Creditcard
              CPanel creditcard = new CPanel(new GridBagLayout());
              creditcard.setBorder(new TitledBorder(Msg.translate(Env.getCtx(), "CreditCardType")));
              gbc.gridy = 2;
              add (creditcard, gbc);
              GridBagConstraints gbc1 = new GridBagConstraints();
              gbc1.insets = INSETS2;
              gbc1.anchor = GridBagConstraints.WEST;
              gbc1.gridx = 0;
              gbc1.gridy = 0;
              f_lcreditCardNumber = new CLabel(Msg.translate(Env.getCtx(), "CreditCardNumber"));
              creditcard.add (f_lcreditCardNumber, gbc1);
              gbc1.gridy = 1;
              f_creditCardNumber = new CTextField(18);
              creditcard.add (f_creditCardNumber, gbc1);
              gbc1.gridx = 1;
              gbc1.gridy = 0;
              f_lcreditCardExp = new CLabel(Msg.translate(Env.getCtx(),"CreditCardExp"));
              creditcard.add (f_lcreditCardExp, gbc1);
              gbc1.gridy = 1;
              f_creditCardExp = new CTextField(5);
              creditcard.add (f_creditCardExp, gbc1);
              gbc1.gridx = 2;
              gbc1.gridy = 0;
              f_lcreditCardVV = new CLabel(Msg.translate(Env.getCtx(), "CreditCardVV"));
              creditcard.add (f_lcreditCardVV, gbc1);
              gbc1.gridy = 1;
              f_creditCardVV = new CTextField(5);
              creditcard.add (f_creditCardVV, gbc1);
              gbc1.gridx = 3;
              gbc1.gridy = 0;
              gbc1.gridheight = 2;
              f_creditPayment = createButtonAction("Payment", null);
              f_creditPayment.setActionCommand("CreditCard");
              gbc1.anchor = GridBagConstraints.EAST;
              gbc1.weightx = 0.1;
              creditcard.add (f_creditPayment, gbc1);
         }     //     init
          *      Get Panel Position
         public GridBagConstraints getGridBagConstraints()
              GridBagConstraints gbc = super.getGridBagConstraints();
              gbc.gridx = 0;
              gbc.gridy = 3;
              return gbc;
         }     //     getGridBagConstraints
          *      Dispose - Free Resources
         public void dispose()
              super.dispose();
         }     //     dispose
          *      Action Listener
          *     @param e event
         public void actionPerformed (ActionEvent e)
              String action = e.getActionCommand();
              if (action == null || action.length() == 0)
                   return;
              log.info( "PosSubCheckout - actionPerformed: " + action);
              if (e.getSource() == f_cashGiven) {
                   f_cashGiven.setValue(f_cashGiven.getValue());
                   System.out.println("f_cashGiven"+f_cashGiven.getDisplay());
              //     Register
              //     Summary
              //     Print
              if (action.equals("Cash")) {
                   BigDecimal CashGiven, GrandTotal, CashReturn;
                   System.out.println("Cash given is "+f_cashGiven.getDisplay());
                   CashGiven = (BigDecimal)f_cashGiven.getValue();
                   GrandTotal = (BigDecimal)p_posPanel.f_curLine.getOrder().getGrandTotal();
                   CashReturn = CashGiven.subtract(GrandTotal);
                   f_cashReturn.setValue(CashReturn);
              //     Cash (Payment)
              //     CreditCard (Payment)
         }     //     actionPerformed
    }     //     PosSubCheckoutThis is the code of VNumber.java :
    * The contents of this file are subject to the   Compiere License  Version 1.1
    * ("License"); You may not use this file except in compliance with the License
    * You may obtain a copy of the License at http://www.compiere.org/license.html
    * Software distributed under the License is distributed on an  "AS IS"  basis,
    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
    * the specific language governing rights and limitations under the License.
    * The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
    * Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
    * are Copyright (C) 1999-2005 Jorg Janke.
    * All parts are Copyright (C) 1999-2005 ComPiere, Inc.  All Rights Reserved.
    * Contributor(s): ______________________________________.
    package org.compiere.grid.ed;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.*;
    import java.math.*;
    import java.text.*;
    import java.util.logging.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import org.compiere.apps.*;
    import org.compiere.model.*;
    import org.compiere.swing.*;
    import org.compiere.util.*;
    *     Number Control
    *      @author      Jorg Janke
    *      @version      $Id: VNumber.java,v 1.41 2005/09/03 01:57:16 jjanke Exp $
    public final class VNumber extends JComponent
         implements VEditor, ActionListener, KeyListener, FocusListener
         /**     Number of Columns (12)          */
         public final static int SIZE = 12;
          *  IDE Bean Constructor
         public VNumber()
              this("Number", false, false, true, DisplayType.Number, "Number");
         }   //  VNumber
          *     Create right aligned Number field.
          *     no popup, if WindowNo == 0 (for IDs)
          *  @param columnName column name
          *  @param mandatory mandatory
          *  @param isReadOnly read only
          *  @param isUpdateable updateable
          *  @param displayType display type
          *  @param title title
         public VNumber(String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable,
              int displayType, String title)
              super();
              super.setName(columnName);
              m_columnName = columnName;
              m_title = title;
              setDisplayType(displayType);
              LookAndFeel.installBorder(this, "TextField.border");
              this.setLayout(new BorderLayout());
    //          this.setPreferredSize(m_text.getPreferredSize());          //     causes r/o to be the same length
    //          int height = m_text.getPreferredSize().height;
    //          setMinimumSize(new Dimension (30,height));
              //     ***     Text     ***
              m_text.setBorder(null);
              m_text.setHorizontalAlignment(JTextField.TRAILING);
              m_text.addKeyListener(this);
              m_text.addFocusListener(this);
              //     Background
              setMandatory(mandatory);
              this.add(m_text, BorderLayout.CENTER);
              //     ***     Button     ***
              m_button.setIcon(Env.getImageIcon("Calculator10.gif"));
              m_button.setMargin(new Insets(0, 0, 0, 0));
              m_button.setFocusable(false);
              m_button.addActionListener(this);
              this.add (m_button, BorderLayout.EAST);
              //     Prefereed Size
              this.setPreferredSize(this.getPreferredSize());          //     causes r/o to be the same length
              //  Size
              setColumns(SIZE, CComboBox.FIELD_HIGHT-4);     
              //     ReadWrite
              if (isReadOnly || !isUpdateable)
                   setReadWrite(false);
              else
                   setReadWrite(true);
         }     //     VNumber
          *  Dispose
         public void dispose()
              m_text = null;
              m_button = null;
              m_mField = null;
         }   //  dispose
          *     Set Document
          *  @param doc document
         protected void setDocument(Document doc)
              m_text.setDocument(doc);
         }     //     getDocument
         private String               m_columnName;
         protected int               m_displayType;     //  Currency / UoM via Context
         private DecimalFormat     m_format;
         private String               m_title;
         private boolean               m_setting;
         private String               m_oldText;
         private String               m_initialText;
         private boolean               m_rangeSet = false;
         private Double               m_minValue;
         private Double               m_maxValue;
         private boolean               m_modified = false;
         /**  The Field                  */
         private CTextField          m_text = new CTextField(SIZE);     //     Standard
         /** The Button                  */
         private CButton              m_button = new CButton();
         private MField          m_mField = null;
         /**     Logger               */
         private static CLogger log = CLogger.getCLogger(VNumber.class);
          *      Set no of Columns
          *     @param columns columns
         public void setColumns (int columns, int height)
              m_text.setPreferredSize(null);
              m_text.setColumns(columns);
              Dimension size = m_text.getPreferredSize();
              if (height > size.height)               //     default 16
                   size.height = height;
              if (CComboBox.FIELD_HIGHT-4 > size.height)
                   size.height = VLookup.FIELD_HIGHT-4;
              this.setPreferredSize(size);          //     causes r/o to be the same length
              this.setMinimumSize(new Dimension (columns*10, size.height));
              m_button.setPreferredSize(new Dimension(size.height, size.height));
         }     //     setColumns
          *     Set Range with min & max
          *  @param minValue min value
          *  @param maxValue max value
          *     @return true, if accepted
         public boolean setRange(Double minValue, Double maxValue)
              m_rangeSet = true;
              m_minValue = minValue;
              m_maxValue = maxValue;
              return m_rangeSet;
         }     //     setRange
          *     Set Range with min & max = parse US style number w/o Gouping
          *  @param minValue min value
          *  @param maxValue max value
          *  @return true if accepted
         public boolean setRange(String minValue, String maxValue)
              if (minValue == null || maxValue == null)
                   return false;
              try
                   m_minValue = Double.valueOf(minValue);
                   m_maxValue = Double.valueOf(maxValue);
              catch (NumberFormatException nfe)
                   return false;
              m_rangeSet = true;
              return m_rangeSet;
         }     //     setRange
          *  Set and check DisplayType
          *  @param displayType display type
         public void setDisplayType (int displayType)
              m_displayType = displayType;
              if (!DisplayType.isNumeric(displayType))
                   m_displayType = DisplayType.Number;
              m_format = DisplayType.getNumberFormat(displayType);
              m_text.setDocument (new MDocNumber(displayType, m_format, m_text, m_title));
         }   //  setDisplayType
          *     Set ReadWrite
          *  @param value value
         public void setReadWrite (boolean value)
              if (m_text.isReadWrite() != value)
                   m_text.setReadWrite(value);
              if (m_button.isReadWrite() != value)
                   m_button.setReadWrite(value);
              //     Don't show button if not ReadWrite
              if (m_button.isVisible() != value)
                   m_button.setVisible(value);
         }     //     setReadWrite
          *     IsReadWrite
          *  @return true if rw
         public boolean isReadWrite()
              return m_text.isReadWrite();
         }     //     isReadWrite
          *     Set Mandatory (and back bolor)
          *  @param mandatory mandatory
         public void setMandatory (boolean mandatory)
              m_text.setMandatory(mandatory);
         }     //     setMandatory
          *     Is it mandatory
          *  @return true if mandatory
         public boolean isMandatory()
              return m_text.isMandatory();
         }     //     isMandatory
          *     Set Background
          *  @param color color
         public void setBackground(Color color)
              m_text.setBackground(color);
         }     //     setBackground
          *     Set Background
          *  @param error error
         public void setBackground (boolean error)
              m_text.setBackground(error);
         }     //     setBackground
          *  Set Foreground
          *  @param fg foreground
         public void setForeground(Color fg)
              m_text.setForeground(fg);
         }   //  setForeground
          *     Set Editor to value
          *  @param value value
         public void setValue(Object value)
              log.finest("Value=" + value);
              if (value == null)
                   m_oldText = "";
              else
                   m_oldText = m_format.format(value);
              //     only set when not updated here
              if (m_setting)
                   return;
              m_text.setText (m_oldText);
              m_initialText = m_oldText;
              m_modified = false;
         }     //     setValue
          *  Property Change Listener
          *  @param evt event
         public void propertyChange (PropertyChangeEvent evt)
              if (evt.getPropertyName().equals(org.compiere.model.MField.PROPERTY))
                   setValue(evt.getNewValue());
         }   //  propertyChange
          *     Return Editor value
          *  @return value value (big decimal or integer)
         public Object getValue()
              if (m_text == null || m_text.getText() == null || m_text.getText().length() == 0)
                   return null;
              String value = m_text.getText();
              //     return 0 if text deleted
              if (value == null || value.length() == 0)
                   if (!m_modified)
                        return null;
                   if (m_displayType == DisplayType.Integer)
                        return new Integer(0);
                   return Env.ZERO;
              if (value.equals(".") || value.equals(",") || value.equals("-"))
                   value = "0";
              try
                   Number number = m_format.parse(value);
                   value = number.toString();      //     converts it to US w/o thousands
                   BigDecimal bd = new BigDecimal(value);
                   if (m_displayType == DisplayType.Integer)
                        return new Integer(bd.intValue());
                   if (bd.signum() == 0)
                        return bd;
                   return bd.setScale(m_format.getMaximumFractionDigits(), BigDecimal.ROUND_HALF_UP);
              catch (Exception e)
                   log.log(Level.SEVERE, "Value=" + value, e);
              if (m_displayType == DisplayType.Integer)
                   return new Integer(0);
              return Env.ZERO;
         }     //     getValue
          *  Return Display Value
          *  @return value
         public String getDisplay()
              return m_text.getText();
         }   //  getDisplay
          *      Get Title
          *     @return title
         public String getTitle()
              return m_title;
         }     //     getTitle
          *      Plus - add one.
          *      Also sets Value
          *     @return new value
         public Object plus()
              Object value = getValue();
              if (value == null)
                   if (m_displayType == DisplayType.Integer)
                        value = new Integer(0);
                   else
                        value = Env.ZERO;
              //     Add
              if (value instanceof BigDecimal)
                   value = ((BigDecimal)value).add(Env.ONE);
              else
                   value = new Integer(((Integer)value).intValue() + 1);
              setValue(value);
              return value;
         }     //     plus
          *      Minus - subtract one, but not below minimum.
          *      Also sets Value
          *     @param minimum minimum
          *     @return new value
         public Object minus (int minimum)
              Object value = getValue();
              if (value == null)
                   if (m_displayType == DisplayType.Integer)
                        value = new Integer(minimum);
                   else
                        value = new BigDecimal(minimum);
                   setValue(value);
                   return value;
              //     Subtract
              if (value instanceof BigDecimal)
                   BigDecimal bd = ((BigDecimal)value).subtract(Env.ONE);
                   BigDecimal min = new BigDecimal(minimum);
                   if (bd.compareTo(min) < 0)
                        value = min;
                   else
                        value = bd;
              else
                   int i = ((Integer)value).intValue();
                   i--;
                   if (i < minimum)
                        i = minimum;
                   value = new Integer(i);
              setValue(value);
              return value;
         }     //     minus
          *     Action Listener
          *  @param e event
         public void actionPerformed (ActionEvent e)
              log.config(e.getActionCommand());
              if (ValuePreference.NAME.equals(e.getActionCommand()))
                   if (MRole.getDefault().isShowPreference())
                        ValuePreference.start (m_mField, getValue());
                   return;
              if (e.getSource() == m_button)
                   m_button.setEnabled(false);
                   String str = startCalculator(this, m_text.getText(), m_format, m_displayType, m_title);
                   m_text.setText(str);
                   m_button.setEnabled(true);
                   try
                        fireVetoableChange (m_columnName, m_oldText, getValue());
                   catch (PropertyVetoException pve)     {}
                   m_text.requestFocus();
         }     //     actionPerformed
          *     Key Listener Interface
          *  @param e event
         public void keyTyped(KeyEvent e)    {}
         public void keyPressed(KeyEvent e)  {}
          *     Key Listener.
          *          - Escape           - Restore old Text
          *          - firstChange     - signal change
          *  @param e event
         public void keyReleased(KeyEvent e)
              log.finest("Key=" + e.getKeyCode() + " - " + e.getKeyChar()
                           + " -> " + m_text.getText());
              //  ESC
              if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
                   m_text.setText(m_initialText);
              m_modified = true;
              m_setting = true;
              try
                   if (e.getKeyCode() == KeyEvent.VK_ENTER)     //     10
                        fireVetoableChange (m_columnName, m_oldText, getValue());
                        fireActionPerformed();
                   else     //     indicate change
                        fireVetoableChange (m_columnName, m_oldText, null);     
              catch (PropertyVetoException pve)     {}
              m_setting = false;
         }     //     keyReleased
          *     Focus Gained
          *  @param e event
         public void focusGained (FocusEvent e)
              if (m_text != null)
                   m_text.selectAll();
         }     //     focusGained
          *     Data Binding to MTable (via GridController.vetoableChange).
          *  @param e event
         public void focusLost (FocusEvent e)
         //          log.finest(e.toString());
              //     APanel - Escape
              if (e.getOppositeComponent() instanceof AGlassPane)
                   m_text.setText(m_initialText);
                   return;
              try
                   fireVetoableChange (m_columnName, m_initialText, getValue());
                   fireActionPerformed();
              catch (PropertyVetoException pve)     {}
         }   //  focusLost
          *     Invalid Entry - Start Calculator
          *  @param jc parent
          *  @param value value
          *  @param format format
          *  @param displayType display type
          *  @param title title
          *  @return value
         public static String startCalculator(Container jc, String value,
              DecimalFormat format, int displayType, String title)
              log.config("Value=" + value);
              BigDecimal startValue = new BigDecimal(0.0);
              try
                   if (value != null && value.length() > 0)
                        Number number = format.parse(value);
                        startValue = new BigDecimal (number.toString());
              catch (ParseException pe)
                   log.info("InvalidEntry - " + pe.getMessage());
              //     Find frame
              Frame frame = Env.getFrame(jc);
              //     Actual Call
              Calculator calc = new Calculator(frame, title,
                   displayType, format, startValue);
              AEnv.showCenterWindow(frame, calc);
              BigDecimal result = calc.getNumber();
              log.config( "Result=" + result);
              calc = null;
              if (result != null)
                   return format.format(result);
              else
                   return value;          //     original value
         }     //     startCalculator
          *  Set Field/WindowNo for ValuePreference
          *  @param mField field
         public void setField (MField mField)
              m_mField = mField;
              if (m_mField != null
                   && MRole.getDefault().isShowPreference())
                   ValuePreference.addMenu (this, popupMenu);
         }   //  setField
          *      Remove Action Listner
          *      @param l Action Listener
         public void removeActionListener(ActionListener l)
              listenerList.remove(ActionListener.class, l);
         }     //     removeActionListener
          *      Add Action Listner
          *      @param l Action Listener
         public void addActionListener(ActionListener l)
              listenerList.add(ActionListener.class, l);
         }     //     addActionListener
          *      Fire Action Event to listeners
         protected void fireActionPerformed()
              int modifiers = 0;
              AWTEvent currentEvent = EventQueue.getCurrentEvent();
              if (currentEvent instanceof InputEvent)
                   modifiers = ((InputEvent)currentEvent).getModifiers();
              else if (currentEvent instanceof ActionEvent)
                   modifiers = ((ActionEvent)currentEvent).getModifiers();
              ActionEvent ae = new ActionEvent (this, ActionEvent.ACTION_PERFORMED,
                   "VNumber", EventQueue.getMostRecentEventTime(), modifiers);
              // Guaranteed to return a non-null array
              Object[] listeners = listenerList.getListenerList();
              // Process the listeners last to first, notifying those that are interested in this event
              for (int i = listeners.length-2; i>=0; i-=2)
                   if (listeners==ActionListener.class)
                        ((ActionListener)listeners[i+1]).actionPerformed(ae);
         }     //     fireActionPerformed
    }     //     VNumber

    If getValue() returns null, you need to trace the execution of the code and figure out which sequence of code is leading to the return of null. This method looks complex - a lot of if statements. If you do not have a debugger, put System.out.println statements inside the method to figure out what's going on.

  • "How to get distinct values of sharepoint column using SSRS"

    Hi,
        I have integrated sharepoint list data to SQL Server reporting services. I am using the below to query sharepoint list data using sql reporting services.
    <Query>
       <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
       <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
          <Parameters>
             <Parameter Name="listName">
                <DefaultValue>{GUID of list}</DefaultValue>
             </Parameter>
             <Parameter Name="viewName">
                <DefaultValue>{GUID of listview}</DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>9999</DefaultValue>
             </Parameter>           
          </Parameters>
       </Method>  
    <ElementPath IgnoreNamespaces="True">*</ElementPath>
    </Query>
    By using this query, I am getting a dataset which includes all the columns of sharepoint list. Among these columns, I wanted to display only 2 columns (i.e Region and Sales type) using chart. I have created a Region parameter but when I click preview, the drop down box is giving me all the repeatative values of region like RG1,RG1,RG1,RG2,RG2,RG2,RG2,RG3.......... I wanted to display only distinct values of Region parameter so that whenever end user select region from the parameter drop down, it will display the respective value of Sales type column.
    Also when I select only RG1 parameter, it is giving me a chart including the sales type of all the Regions. (it should display me only the sales type of RG1) How can I link these 2 columns so that they will display the values respectively.
              I would really appreciate if anyone can help me out with this.
    Thanks,
    Sam.

    Hi Sam,
    By code, the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results.
    In this case, we could use the custom code to get distinct records.
    Here are the detailed steps:
    1.         Create a hidden parameter that gets all the records in one field.
    Note: Please create another dataset that is same of the main dataset. This dataset is used for the parameter.
    2.         Create a function that used to remove the duplicate records.
    Here is the code:
    Public Shared Function RemoveDups(ByVal items As String) As String
    Dim noDups As New System.Collections.ArrayList()
    Dim SpStr
    SpStr = Split(items ,",")
    For i As Integer=0 To Ubound(Spstr)
    If Not noDups.Contains(SpStr(i).Trim()) Then
    noDups.Add(SpStr(i).Trim())
    End If
    Next
    Dim uniqueItems As String() = New String(noDups.Count-1){}
    noDups.CopyTo(uniqueItems)
    Return String.Join(",", uniqueItems)
    End Function
    3.         Create another parameter that will be used for filtering the maindata.
    Please set the available value to be =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",")
    And the default value to be the value you what such as the first value:
    =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",").(0)
    4.         Go to the main dataset. Open the property window of this dataset.
    5.         In the “Filters” tab, set the filter to be:
    Expression: <The field to be filter>
    Operator: =
    Value: =Parameters!Region.Value
    The parameter “Region” should be the parameter we created in the step3.
    Now, we should get distinct values of SharePoint columns.
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jin
    Jin Chen - MSFT

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated bothe from the DB and hard coding. When I run, I am able to see the options on the DDs. But none of the CRUD work. I think this is because my set and get for the drop down is wrong. Then again, I also have a few text fields from the original example which also don't seem to work. Here is a piece of my addButton():
            RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
            PaymentDetails[] pv = getSessionBean1().getPaymentVoucher();
            int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
            PaymentDetails upPV = pv[rowId];
            bankCodeDD.getSelected();
            statusDD.getSelected(); // hard coded value
          upPV.setPrepBy((String) prepByField.getText());
          PaymentDetailsController pvController = new PaymentDetailsController();
            pvController.addPaymentDetails(upPV);
            addRequest = false;
            return null;How do I set and get the values from the drop down so than it passed to my bean? When I choose a row to be updated, make changes and click Update, I get this message on my Tomcat:
    com.sun.webui.jsf.component.DropDown::The current value of component form1:deptCodeDD does not match any of the selections.
    Did you forget to reset the value after changing the options?Can someone please point me to a place which shows how I can add a default value from my DD? I tried to follow http://www.netbeans.org/kb/55/dropdowncomp.html, but unable to complete because I get an error for Options api. The auto-fix imported import org.apache.jasper.Options; But the package given in the tutorial is com.sun.webui.jsf.model.Option. My Java version is 1.6.0_07.
    private Options listOptions[];
    ...//getter setter goes here
    listOptions = new Option[noofDBRows + 1];Many Thanks!

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • I want to get the values from the second hiphen only

    Hey Guys,
    I have one column and the data like this
    col1 = 'AI463-901-001'
    Now,
    I want to get the values from the second hiphen only(any no. of values).
    Please can any one help me on this .
    Thanks in advance!
    Regards,
    -LK

    you have a mistake
    you result is -001
    this is right
      select substr('AI463-901-001',instr('AI463-901-001','-',1,2)+1) from dual;
      -- @user11928732 -  if you are using Oracle Database 11g, ttry this please
    with data as
      (select  'AI463-901-001'from dual)
      select substr(str,instr(str,'-',1,2)+1) from data;
      select substr(<YOUR COLUMN>,instr(<YOUR COLUMN>,'-',1,2)+1) from <YOUR TABLE>;result is : 001
    Edited by: Mahir M. Quluzade on May 3, 2011 5:37 PM

  • Reading values from lookup columns through custom workflow in SharePoint 2013

    We are able to read the values of text, number columns through custom workflow (via coding) in SharePoint 2013. However, we are not able to read values from lookup columns. So, request anyone to provide help on this.
    Thanks & regards,
    Aditya

    Hi,
    According to your post, my understanding is that you want to read values from lookup columns through custom workflow in SharePoint 2013.
    Since the workflow just doesn't get lookup fields, let's give it something static to work with instead. If we can capture the ID of the lookup field and store that as a static value in our list, the workflow can happily use that to look up our related.
    For more information, you can refer to:
    SharePoint 2013 Workflows and Lookup Columns
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Touble getting cell values from jTable

    Hi everybody, I need some hepl to understand this problem.
    I have jtable and I�m trying to get the values from the cells (first in the jOption panel then to jLabel and to jTextFields).
    All cell values are shown perfectly in the JOptionPanel.
    But I can�t get any values to the jLabel from the first column(0) no matter what row I press from the firts column.
    It gives me this error
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Integer
         at taulukko3.FTaulukko3.jTable1_mouseClicked(FTaulukko3.java:163)Here is my code where I think the problem is:
    public void jTable1_mouseClicked(MouseEvent e) {
       JOptionPane.showMessageDialog(this,jTable1.getValueAt(jTable1.getSelectedRow(),jTable1.getSelectedColumn()));
          try{
          int valittusarake = jTable1.getSelectedColumn();
           String tulos= "";
           if (valittusarake == 0) {
             tulos = (String) jTable1.getValueAt(jTable1.getSelectedRow(),
                                                      jTable1.getSelectedColumn());
            jLabel1.setText(tulos);
           if (valittusarake == 1) {
             tulos = (String) jTable1.getValueAt(jTable1.getSelectedRow(),
                                                       jTable1.getSelectedColumn());
             jTextField1.setText(tulos);
           if (valittusarake == 2) {
             tulos = (String) jTable1.getValueAt(jTable1.getSelectedRow(),
                                                       jTable1.getSelectedColumn());
             jTextField2.setText(tulos);
    }

    Hi everybody
    I got it workin by making this change to my code:
          if (valittusarake == 0) {
             Object tulos1 = jTable1.getValueAt(jTable1.getSelectedRow(),jTable1.getSelectedColumn());
             jLabel1.setText(tulos1.toString());
          }

Maybe you are looking for

  • Devices are not showing up in Finder sidebar

    All of a sudden attached devices are not showing up in the sidebar in finder nor on the desktop, have already checked Finder prefs and are all set correctly. Cant access files on attached hard drive and cant dismount. Upon pulling the plug I get the

  • Mac mini doesn't recognize TV

    I've hooked my new Mac mini up to my TV using an S Video adapter (the DVD player the mini will be replacing used S Video, so I assumed it would work fine). It's connected as auxiliary input, but when I switch the TV to auxiliary and boot up the mac m

  • [Weird Error!!] Insufficent space in working directory when create db clone

    Hi guys, I met a problem when creating Oracle database clone by EM 10.2.0.3 TC9 Target Oracle Database is 10.2.0.2 version and on RH Linux Enterprise Server 3.0 I selected right host to clone, and gave username/password, and working directory. When p

  • Custom thumbnail for a file type, not a single file

    I understand that when I upload an asset to the DAM of a file type for which CQ5 doesn't support thumbnail generation (Excel .xls and .xlsx, in my case), CQ5 will use a default dogeared-page icon for the thumbnail.  it also writes an error-level mess

  • PL/SQL Equivalent to the condition "No inline validation errors displayed"

    Hello, I've seen this on another thread but can't find it. I need two conditions to be true to show a region: a value is not null and no inline validation errors are showing. Does anyone know the PL/SQL (API call?) to retrieve the number of errors be