Need help on Null value check function

Hey guys,
I need to create a function that will accept two values and perform a comparison on them and based on whether or not they're different, return true or false.
Initially I had no idea about the problems of comparing when a value was null, hence the need for a function, as I need to compare many fields of rows of a table in order to find what has changed.
Now, I think I have the NULL check logic in place :
IF R1.X IS NULL THEN
     IF R2.X IS NULL THEN
          RETURN FALSE; -- both R1 and R2 are null so no diffs
     ELSE
          RETURN TRUE; -- R1 is null but R2 is not, so it's a diff
     END IF;
ELSE
     IF R2.X IS NULL THEN
          RETURN TRUE; -- R1 is not null but R2 is so a diff
     ELSE
          IF R1.X != R2.X THEN
               RETURN TRUE; -- both not null but different
          ELSE
               RETURN FALSE; -- both not null but equal
          END IF;
     END IF;
END IF;My problem is that I don't know how, or if i can, create function that can simply accept two column values without defining their datatypes in the function sig. Reason being that while I will always be comparing like-for-like datatypes, I won't always be comparing the "same" like-for-like datatypes; so as I loop through 100 table rows (differentiated by a date), I'll physically compare all the fields in the rows one by one, and in one instance i'm comapring two NUMBERs and then two VARCHARs and then two DATEs, etc.
What i didn't want was duplicate func's that are all the same apart from the sig's.
Is there an easy(ier) way to accomplish this? Is there a more "generic" value type I could use? basically i just want to have a function like :
CREATE OR REPLACE FUNCTION(val1 VALUE, val2 VALUE)
And not multiple like :
CREATE OR REPLACE FUNCTION(val1 NUMBER, val2 NUMBER)
CREATE OR REPLACE FUNCTION(val1 DATE, val2 DATE)
and so on.
Edited by: user11258962 on 28-Jun-2010 09:02

You can use function overloading. So, although three function will exist, they will all be called the same name, so your code will always call a single function
create or replace package pkg_compare as
  function is_Alike (p1 in number
                    ,p2 in number) return boolean ; 
  function is_Alike (p1 in varchar2
                    ,p2 in varchar2) return boolean; 
  function is_Alike (p1 in date
                    ,p2 in date) return boolean; 
end pkg_Compare;
create or replace package body pkg_compare as
  function is_Alike (p1 in number
                    ,p2 in number) return boolean as
    begin
      return ( nvl(p1,0) = nvl(p2,-1) );
  end is_Alike;
  function is_Alike (p1 in varchar2
                    ,p2 in varchar2) return boolean as
    begin
      return ( nvl(p1,'X') = nvl(p2,'Z') );
  end is_Alike;
  function is_Alike (p1 in date
                    ,p2 in date) return boolean as
    begin
      return ( nvl(p1,sysdate) = nvl(p2,sysdate-1) );
  end is_Alike;
end pkg_Compare;
/

Similar Messages

  • Need help with NULL values in Crosstables

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

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

  • Need to display null values against table

    Hi All,
    I have one table in which I only need to display null values along with the rest of columns. for example
    ename sal date
    scott 2000 15/07/06
    Michal
    now my query should return---
    ename sal date
    michal
    hare krishna
    Alok

    Maybe it is something like this?:
    michaels>  select column_name || ' contains ' ||
           dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() ||
           ' NULL values' null_columns
      from cols
    where table_name = 'EMP'
       and dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() > 0
    NULL_COLUMNS                                                                               
    MGR contains 1 NULL values                                                                 
    COMM contains 10 NULL values  

  • HELP NEEDED !! Null values in Database

    Hi there !!
    I need help with EJB 3.0 passing null values to database. The situation looks like that :
    I have created EJB entity class called "Osoba.java", it is in relation
    with "Rola.java" (one to many). Each Object of class Osoba can have
    many Roles. Then I created "OsobaServiceBean.java " I included it with
    metod "CreateUnregisteredOsoba(Osoba , Boolean)". From "flex" level I
    call this bean - call is accepted, and as a result new object of class Osoba is added to database. Problem is that only one column is filled in table,
    dispite that in service bean I enforce it to fill all columns (see
    source code - file OsobaServiceBean.java , method
    createUnregisteredOsoba() )
    I provided source code here :
    FILE Rola.java
    package test.granite.ejb3.entity ;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.ManyToOne;
    @Entity
    public class Rola extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String login = new String("");
    @Basic
    private String rola = new String("");
    @Basic
    private String roleGroup = new String("");
    @Basic
    private Boolean zatwierdzony = new Boolean(false);
    @ManyToOne(optional=false)
    private Osoba osoba;
    public Boolean getZatwierdzony() {
    return zatwierdzony;
    public void setZatwierdzony(Boolean zatwierdzony) {
    this.zatwierdzony = zatwierdzony;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getRola() {
    return rola;
    public void setRola(String rola) {
    this.rola = rola;
    public Osoba getOsoba() {
    return osoba;
    public void setOsoba(Osoba osoba) {
    this.osoba = osoba;
    public String getRoleGroup() {
    return roleGroup;
    public void setRoleGroup(String roleGroup) {
    this.roleGroup = roleGroup;
    FILE Osoba.java
    package test.granite.ejb3.entity ;
    import java.util.HashSet;
    import java.util.Set;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.OneToMany;
    @Entity
    public class Osoba extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String imie;
    @Basic
    private String nazwisko;
    @Basic
    private String login;
    @Basic
    private String haslo;
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER,
    mappedBy="osoba")
    private Set<Rola> role = new HashSet<Rola>();
    @Basic
    private String email;
    @Basic
    private String nrTelefonu;
    @Basic
    private int rokStudiow;
    public String getPelneImie() {
    StringBuilder sb = new StringBuilder();
    if (imie != null && imie.length() > 0)
    sb.append(imie);
    if (nazwisko != null && nazwisko.length() > 0) {
    if (sb.length() > 0)
    sb.append(' ');
    sb.append(nazwisko);
    return sb.toString();
    public String getImie() {
    return imie;
    public void setImie(String imie) {
    this.imie = imie;
    public String getNazwisko() {
    return nazwisko;
    public void setNazwisko(String nazwisko) {
    this.nazwisko = nazwisko;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getHaslo() {
    return haslo;
    public void setHaslo(String haslo) {
    this.haslo = haslo;
    public Set<Rola> getRole() {
    return role;
    public void setRole(Set<Rola> role) {
    this.role = role;
    public String getEmail() {
    return email;
    public void setEmail(String email) {
    this.email = email;
    public String getNrTelefonu() {
    return nrTelefonu;
    public void setNrTelefonu(String nrTelefonu) {
    this.nrTelefonu = nrTelefonu;
    public int getRokStudiow() {
    return rokStudiow;
    public void setRokStudiow(int rokStudiow) {
    this.rokStudiow = rokStudiow;
    FILE OsobaServiceBean.java
    package test.granite.ejb3.service;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import javax.annotation.security.RolesAllowed;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.Query;
    import org.jboss.annotation.security.SecurityDomain ;
    import test.granite.ejb3.entity.Osoba;
    import test.granite.ejb3.entity.Rola;
    @Stateless
    @Local(OsobaService.class)
    @SecurityDomain("other")
    public class OsobaServiceBean extends AbstractEntityService implements
    OsobaService{
    private static final long serialVersionUID = 1L;
    public OsobaServiceBean() {
    super();
    public List<Osoba> findAllOsoba() {
    return findAll(Osoba.class);
    @SuppressWarnings("unchecked")
    public List<Osoba> findAllOsoba(String name) {
    Query query = manager.createQuery (
    "select distinct p from Osoba p " +
    "where upper(p.imie) like upper('%" + name + "%')
    or upper(p.nazwisko) like upper('%" + name + "%')"
    return query.getResultList();
    public Osoba createOsoba(Osoba person) { // pozwalamy
    tworzyc zeby niezalogowany
    return manager.merge (person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    // zatwierdzona
    @RolesAllowed({"unregistered"})
    public Osoba createUnregisteredOsoba(Osoba person, boolean
    zatwierdzony) {
    Rola niezarejestrowany = new Rola();
    niezarejestrowany.setRola("user");
    niezarejestrowany.setOsoba(person);
    niezarejestrowany.setRoleGroup("Roles");
    niezarejestrowany.setLogin(person.getLogin());
    niezarejestrowany.setZatwierdzony(zatwierdzony);
    Set<Rola> role = new HashSet<Rola>();
    role.add(niezarejestrowany);
    // Arrays;
    Object a[] = role.toArray();
    Rola temp;
    temp = (Rola)a[0];
    System.out.println("Login = " + temp.getLogin() + //
    added only for check !!
    "Rola = " + temp.getLogin() +
    "Zatwierdzony = " +
    temp.getZatwierdzony() +
    "Rolegroup = " + temp.getRoleGroup());
    person.setRole (role);
    return manager.merge(person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    public Osoba modifyOsoba(Osoba person) {
    return manager.merge(person);
    @RolesAllowed({"admin"})
    public void deleteOsoba(Osoba person) {
    person = manager.find(Osoba.class, person.getId());
    manager.remove(person);
    public void deleteRola(Rola rola) {
    rola = manager.find(Rola.class, rola.getId());
    rola.getOsoba().getRole().remove(rola);
    manager.remove(rola);
    DATABASE LISTING :
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | id | ENTITY_UID | version | rola |
    zatwierdzony | osoba_id | login | RoleGroup |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | 1 | | NULL | unregistered |
    | 0 | unregistered | Roles | NULL |
    | 33 | eee91bd9-8c5f-4154-8260-3cac9a18eb97 | 0 | user |
    | 34 | NULL | NULL |
    | 32 | a7ed4e8d-a1ba-473a-921c-73c8f8f89efb | 0 | user |
    | 33 | NULL | NULL |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    The row numer 1 is added by hand and it works. row number 33 and 32
    are added to database by method CreateUnregisteredOsoba. As you can
    see fields login as well as Roles and RoleGroup are empty (NULL). What
    Im doing wrong ?
    Thanks for your help -
    Roman Kli&#347;
    PS. Table Osoba works fine - everything is added as I want.

    I solved problem.
    The reason why EJB had not added anything to database NULL was becouse wrong names of class. Ive refactored whole class Rola.java to RolaClass.java and suddenly it worked.
    True reason is still unknown but most importent is that it works.
    Thanx for reading topic - hope next time someone will answer my questions.
    By !!

  • Need help getting a value from an XML column

    Hi,
    I need to get a value from an XML column in a table (the column is called TEST_XML). I have tried using the Select TEST_XML.value function but it always returns nulls. Could you please take a look at the following xml sample stored in the TEST_XML column
    and help me with the query syntax to get the value of the Bank_Account_Number?.
    =================
    <?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us"
    productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
    <?mso-application progid="InfoPath.Document"?>
    <tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18"
    xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
      <Name />
      <Description />
      <Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP"
    SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName=""
    MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="&#xA;" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1"
    />
      <Init_Information>
        <Date_Required xsi:nil="true" />
      </Init_Information>
      <General_Data>
        <Action>U</Action>
        <Business_Partner_Number xsi:nil="true" />
        <Business_Partner_Grouping>G16</Business_Partner_Grouping>
        <Business_Partner_Type>G003</Business_Partner_Type>
        <Title>002</Title>
        <House_Number xsi:nil="true" />
        <Street xsi:nil="true" />
        <Street_2 xsi:nil="true" />
        <Street_3 xsi:nil="true" />
        <City>ABIDJAN</City>
        <Country>CI</Country>
        <City_Postal_Code xsi:nil="true" />
        <Region xsi:nil="true" />
        <PO_Box xsi:nil="true" />
        <PO_Box_Postal_Code xsi:nil="true" />
        <Language>FR</Language>
        <Purpose>Z003 UNVs</Purpose>
        <Telephone_Number />
        <Mobile_Phone_Number>90075777</Mobile_Phone_Number>
        <Fax_Number xsi:nil="true" />
        <Email_Address>[email protected]</Email_Address>
        <First_Name>Mickey</First_Name>
        <Middle_Name xsi:nil="true" />
        <Last_Name>Mouse</Last_Name>
        <Gender>2</Gender>
        <Index_Number>999999</Index_Number>
        <Date_of_Birth>1969-11-29</Date_of_Birth>
        <Nationality>CI</Nationality>
        <DOB_Day>29</DOB_Day>
        <DOB_Month>11</DOB_Month>
        <DOB_Year>1969</DOB_Year>
        <RelationBPGroupingBPType xsi:nil="true" />
        <BPType_Z016>Z003</BPType_Z016>
        <BPType_Z020 xsi:nil="true" />
        <BPType_Z021 xsi:nil="true" />
        <Sub_Area2>General and Banking</Sub_Area2>
        <SR_Description>Business Partner Number: 
    Business Partner Type: UNVs
    First Name: FirstName
    Last Name: LastName</SR_Description>
        <Sub_Area_Aux>79</Sub_Area_Aux>
        <thereis_general>TRUE</thereis_general>
        <thereis_banking>TRUE</thereis_banking>
        <auxGeneric>GDB</auxGeneric>
        <Business_Area_BP>P022</Business_Area_BP>
        <Search_Term_1>FirstName</Search_Term_1>
        <Search_Term_2>LastName</Search_Term_2>
        <Responsible_Institution xsi:nil="true" />
        <Add_Additional_Address xsi:nil="true" />
        <Add_Additional_Communication xsi:nil="true" />
        <BP_Role_Main xsi:nil="true" />
        <BP_Role_Additional xsi:nil="true" />
        <AddresType xsi:nil="true" />
        <Specify xsi:nil="true" />
        <BP_Category xsi:nil="true" />
        <AddRemoveAddress xsi:nil="true" />
        <AddRemoveCommunication xsi:nil="true" />
        <BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
      </General_Data>
      <Primary_Bank_Account>
        <Bank_Location_ID>0001</Bank_Location_ID>
        <Bank_Country>ML</Bank_Country>
        <Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
        <Bank_Account_Type>1</Bank_Account_Type>
        <IBAN xsi:nil="true" />
        <CurrencyPrimaryIBAN xsi:nil="true" />
        <Account_Holder_Name xsi:nil="true" />
        <CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
        <Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
        <NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
        <NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
        <CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
        <NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
        <NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
        <NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
        <NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
        <NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
        <NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
        <NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
        <Primary_Type_of_Account xsi:nil="true" />
        <invisible1>National ID</invisible1>
        <bDontHasBankAccount>false</bDontHasBankAccount>
        <bBankAccountNotAvailable>false</bBankAccountNotAvailable>
        <CashOrCheck xsi:nil="true" />
        <CashAccountingClerk xsi:nil="true" />
        <BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
        <CheckOptions xsi:nil="true" />
        <SameOrDifferent_IBAN_Primary xsi:nil="true" />
        <SameOrDifferent_National_Primary xsi:nil="true" />
        <SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
        <AccountTitle_IBAN_Primary xsi:nil="true" />
        <AccountTitle_National_Primary xsi:nil="true" />
        <AccountTitle_NotIBAN_Primary xsi:nil="true" />
        <ExplainWhy_IBAN_Primary xsi:nil="true" />
        <ExplainWhy_National_Primary xsi:nil="true" />
        <ExplainWhy_NotIBAN_Primary xsi:nil="true" />
        <Bank_Key xsi:nil="true" />
        <Bank_Control_Key xsi:nil="true" />
        <Special_Instructions_IBAN_Primary xsi:nil="true" />
        <Special_Instructions_National_Primary xsi:nil="true" />
        <Special_Instructions_NotIBAN_Primary xsi:nil="true" />
        <RecordTypePrimary xsi:nil="true" />
        <Payment_Method_UnderCashCheck xsi:nil="true" />
        <ValidUntilPrimaryBank xsi:nil="true" />
      </Primary_Bank_Account>
      <Primary_Intermediary_Bank_Account>
        <Intermediary_Bank_Location_ID xsi:nil="true" />
        <Intermediary_Bank_Country xsi:nil="true" />
        <Intermediary_Bank_Account_Number xsi:nil="true" />
        <Intermediary_Bank_Account_Type xsi:nil="true" />
        <Intermediary_IBAN xsi:nil="true" />
        <CurrencyIntermediaryIBAN xsi:nil="true" />
        <Intermediary_Account_Holder_Name xsi:nil="true" />
        <CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
        <Intermediary_Routing_Number_National_ID xsi:nil="true" />
        <IntermediaryNonIbanAccountHolderName xsi:nil="true" />
        <IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
        <CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
        <NonIbanIntermediaryBankAccountType xsi:nil="true" />
        <NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
        <NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
        <NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
        <NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
        <NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
        <NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
        <IntermediaryBankAccountVisible xsi:nil="true" />
        <Intermediary_Type_of_Account xsi:nil="true" />
        <invisible2 xsi:nil="true" />
        <Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
        <SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
        <SameOrDifferent_National_Intermediary xsi:nil="true" />
        <SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
        <AccountTitle_IBAN_Intermediary xsi:nil="true" />
        <AccountTitle_National_Intermediary xsi:nil="true" />
        <AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
        <ExplainWhy_IBAN_Intermediary xsi:nil="true" />
        <ExplainWhy_National_Intermediary xsi:nil="true" />
        <ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
      </Primary_Intermediary_Bank_Account>
      <Additional_Bank_Account>
        <Additional_Bank_Location_ID xsi:nil="true" />
        <Additional_Bank_Country xsi:nil="true" />
        <Additional_Bank_Account_Number xsi:nil="true" />
        <Additional_Bank_Account_Type xsi:nil="true" />
        <Additional_IBAN xsi:nil="true" />
        <CurrencyAdditionalIBAN xsi:nil="true" />
        <Additional_Account_Holder_Name xsi:nil="true" />
        <CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
        <Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
        <AdditionalNonIbanAccountHolderName xsi:nil="true" />
        <AdditionalNonIbanBankAccountNumber xsi:nil="true" />
        <CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
        <NonIbanAdditionalBankAccountType xsi:nil="true" />
        <NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
        <NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
        <NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
        <NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
        <NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
        <NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
        <AdditionalBankAccountVisible xsi:nil="true" />
        <Additional_Type_of_Account xsi:nil="true" />
        <invisible3 xsi:nil="true" />
        <Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
        <SameOrDifferent_IBAN_Additional xsi:nil="true" />
        <SameOrDifferent_National_Additional xsi:nil="true" />
        <SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
        <AccountTitle_IBAN_Additional xsi:nil="true" />
        <AccountTitle_National_Additional xsi:nil="true" />
        <AccountTitle_NotIBAN_Additional xsi:nil="true" />
        <ExplainWhy_IBAN_Additional xsi:nil="true" />
        <ExplainWhy_National_Additional xsi:nil="true" />
        <ExplainWhy_NotIBAN_Additional xsi:nil="true" />
        <Additional_Bank_Key xsi:nil="true" />
        <Additional_Bank_Control_Key xsi:nil="true" />
        <Special_Instructions_IBAN_Additional xsi:nil="true" />
        <Special_Instructions_National_Additional xsi:nil="true" />
        <Special_Instructions_NotIBAN_Additional xsi:nil="true" />
        <RecordTypeAdditional xsi:nil="true" />
        <ValidUntilAdditionalBank xsi:nil="true" />
      </Additional_Bank_Account>
      <Payment_Information>
        <Block_for_payment>1</Block_for_payment>
        <Payment_Method xsi:nil="true" />
        <Accounting_Clerk xsi:nil="true" />
        <PaymentMethodAdditional xsi:nil="true" />
        <AccountingClerkAdditional xsi:nil="true" />
      </Payment_Information>
      <Additional_Field_for_Purchasing_view>
        <Purchase_order_currency>XOF</Purchase_order_currency>
        <BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
        <Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
        <Posting_block_for_company_code xsi:nil="true" />
        <Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
        <Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
        <Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
        <BPRoleDateBegin xsi:nil="true" />
        <BPRoleDateEnd xsi:nil="true" />
      </Additional_Field_for_Purchasing_view>
      <Requestor_Information>
        <Requested_By>REQUESTOR</Requested_By>
        <Org_Unit>MVCON</Org_Unit>
        <Date>2014-05-19</Date>
        <Reason xsi:nil="true" />
        <On_Form xsi:nil="true" />
        <Attached xsi:nil="true" />
        <Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
        <RequestorBusinessArea>P022</RequestorBusinessArea>
        <RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
        <Display_Review_Approval_Section xsi:nil="true" />
      </Requestor_Information>
      <Review_Information>
        <Review_By xsi:nil="true" />
        <Org_Unit xsi:nil="true" />
        <Date xsi:nil="true" />
      </Review_Information>
      <Approval_Information>
        <Approved_By xsi:nil="true" />
        <Org_Unit xsi:nil="true" />
        <Date xsi:nil="true" />
      </Approval_Information>
      <Reception_Information>
        <Received_By xsi:nil="true" />
        <Org_Unit xsi:nil="true" />
        <Date xsi:nil="true" />
      </Reception_Information>
      <Entry_Information>
        <Entered_By xsi:nil="true" />
        <Org_Unit xsi:nil="true" />
        <Date xsi:nil="true" />
      </Entry_Information>
      <Verification_Information>
        <Verified_By xsi:nil="true" />
        <Org_Unit xsi:nil="true" />
        <Date xsi:nil="true" />
      </Verification_Information>
      <Order_Currency>
        <Order_Currency_New xsi:nil="true" />
      </Order_Currency>
      <Change_BP_Group>
        <BP_Group_Existing xsi:nil="true" />
        <BP_Type_Existing xsi:nil="true" />
        <BP_Role_Existing xsi:nil="true" />
        <BP_Group_New xsi:nil="true" />
        <BP_Type_New xsi:nil="true" />
        <BP_Role_New xsi:nil="true" />
        <BPTypeAuxVisible1 xsi:nil="true" />
        <BPTypeAuxVisible2 xsi:nil="true" />
      </Change_BP_Group>
      <Expire_or_Add_Validity_Period_to_BP_Role>
        <Additional_BP_Role_Entry xsi:nil="true" />
      </Expire_or_Add_Validity_Period_to_BP_Role>
      <Add_Alternative_Payees>
        <Additional_Payee xsi:nil="true" />
      </Add_Alternative_Payees>
      <Establish_BP_Relationship>
        <Additional_Relationship_EntryB xsi:nil="true" />
      </Establish_BP_Relationship>
      <Block_BP>
        <PaymentBlock xsi:nil="true" />
        <Reason_Payment_Block xsi:nil="true" />
        <PostingBlock xsi:nil="true" />
        <Reason_Posting_Block xsi:nil="true" />
        <PurchasingBlock xsi:nil="true" />
        <Reason_Purchasing_Block xsi:nil="true" />
        <CentralBlock xsi:nil="true" />
        <Reason_Central_Block xsi:nil="true" />
        <FlagforArchiving xsi:nil="true" />
        <Reason_Flag_Block xsi:nil="true" />
        <TerminateBP xsi:nil="true" />
        <Reason_Terminate_Block xsi:nil="true" />
      </Block_BP>
      <Options>
        <Option1>true</Option1>
        <Option2>false</Option2>
        <Option3>true</Option3>
        <Option4>false</Option4>
        <Option5>false</Option5>
        <Option6>false</Option6>
        <Option7>false</Option7>
        <Option8>false</Option8>
        <Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
      </Options>
      <Sec_Update_BP_Legal_Name>
        <NewLegalFirstName xsi:nil="true" />
        <NewLegalMiddleName xsi:nil="true" />
        <NewLegalLastName xsi:nil="true" />
      </Sec_Update_BP_Legal_Name>
      <line>
        <IDType>
          <IDType xsi:nil="true" />
          <LegacyIDNumber xsi:nil="true" />
          <Responsible_Institution_Legacy xsi:nil="true" />
          <AddRemoveID_R xsi:nil="true" />
        </IDType>
      </line>
      <Address>
        <Section_Address>
          <AddressTypeR xsi:nil="true" />
          <StreetR xsi:nil="true" />
          <StreetR_2 xsi:nil="true" />
          <StreetR_3 xsi:nil="true" />
          <House_NumberR xsi:nil="true" />
          <City_Postal_CodeR xsi:nil="true" />
          <CityR xsi:nil="true" />
          <CountryR xsi:nil="true" />
          <StateRegionProvinceR xsi:nil="true" />
          <PO_BoxR xsi:nil="true" />
          <PO_Box_PostalCodeR xsi:nil="true" />
          <SpecifyR xsi:nil="true" />
          <AddRemoveAddressR xsi:nil="true" />
        </Section_Address>
        <PO_BoxR2>
          <SecPoBoxR2>
            <PO_BoxR2 xsi:nil="true" />
            <PO_Box_Postal_CodeR2 xsi:nil="true" />
          </SecPoBoxR2>
        </PO_BoxR2>
      </Address>
      <Communication>
        <Communication_Section>
          <Telephone_NumberR xsi:nil="true" />
          <Mobile_Phone_NumberR xsi:nil="true" />
          <Fax_NumberR xsi:nil="true" />
          <Email_AddressR xsi:nil="true" />
          <AddRemoveCommunicationR xsi:nil="true" />
        </Communication_Section>
      </Communication>
      <Expire_or_Add_Validaty_to_BP_RoleR>
        <Expire_or_Add_Validaty>
          <BP_RoleR xsi:nil="true" />
          <Expire_or_Add_Validity_PeriodR xsi:nil="true" />
          <Valid_FromR xsi:nil="true" />
          <Valid_ToR xsi:nil="true" />
        </Expire_or_Add_Validaty>
      </Expire_or_Add_Validaty_to_BP_RoleR>
      <Add_Alternative_PayeesR>
        <Alternative_Payees>
          <Add_Update_Remove xsi:nil="true" />
          <Permited_Payee_BP_NumberR xsi:nil="true" />
          <Name_Alt_PayeeR xsi:nil="true" />
          <Index_NumberR xsi:nil="true" />
          <TitleR xsi:nil="true" />
          <First_NameR xsi:nil="true" />
          <Middle_NameR xsi:nil="true" />
          <Last_NameR xsi:nil="true" />
        </Alternative_Payees>
      </Add_Alternative_PayeesR>
      <Establish_BP_RelationshipR>
        <Relationship>
          <BP_Number_Main xsi:nil="true" />
          <Relationship_CategoryR xsi:nil="true" />
          <ValidFromR xsi:nil="true" />
          <ValidToRelationshipR xsi:nil="true" />
          <BPNumber_SecondaryR xsi:nil="true" />
          <Index_Number_Secondary_Relationship xsi:nil="true" />
          <Business_Area_Secondary xsi:nil="true" />
          <Title_Secondary_BP xsi:nil="true" />
          <First_Name_Secondary_BPR xsi:nil="true" />
          <MiddleNameSecondaryBPR xsi:nil="true" />
          <LastNameSecondaryBP xsi:nil="true" />
          <Add_Update_DeleteR xsi:nil="true" />
        </Relationship>
      </Establish_BP_RelationshipR>
      <PO_BoxR>
        <SecPoBoxR>
          <PO_BoxR xsi:nil="true" />
          <PO_Box_Postal_CodeR xsi:nil="true" />
        </SecPoBoxR>
      </PO_BoxR>
    </tns:OF_Forms>

    See this illustration
    declare @x xml='<?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us" productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
    <?mso-application progid="InfoPath.Document"?>
    <tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
    <Name />
    <Description />
    <Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP" SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName="" MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="&#xA;" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1" />
    <Init_Information>
    <Date_Required xsi:nil="true" />
    </Init_Information>
    <General_Data>
    <Action>U</Action>
    <Business_Partner_Number xsi:nil="true" />
    <Business_Partner_Grouping>G16</Business_Partner_Grouping>
    <Business_Partner_Type>G003</Business_Partner_Type>
    <Title>002</Title>
    <House_Number xsi:nil="true" />
    <Street xsi:nil="true" />
    <Street_2 xsi:nil="true" />
    <Street_3 xsi:nil="true" />
    <City>ABIDJAN</City>
    <Country>CI</Country>
    <City_Postal_Code xsi:nil="true" />
    <Region xsi:nil="true" />
    <PO_Box xsi:nil="true" />
    <PO_Box_Postal_Code xsi:nil="true" />
    <Language>FR</Language>
    <Purpose>Z003 UNVs</Purpose>
    <Telephone_Number />
    <Mobile_Phone_Number>90075777</Mobile_Phone_Number>
    <Fax_Number xsi:nil="true" />
    <Email_Address>[email protected]</Email_Address>
    <First_Name>Mickey</First_Name>
    <Middle_Name xsi:nil="true" />
    <Last_Name>Mouse</Last_Name>
    <Gender>2</Gender>
    <Index_Number>999999</Index_Number>
    <Date_of_Birth>1969-11-29</Date_of_Birth>
    <Nationality>CI</Nationality>
    <DOB_Day>29</DOB_Day>
    <DOB_Month>11</DOB_Month>
    <DOB_Year>1969</DOB_Year>
    <RelationBPGroupingBPType xsi:nil="true" />
    <BPType_Z016>Z003</BPType_Z016>
    <BPType_Z020 xsi:nil="true" />
    <BPType_Z021 xsi:nil="true" />
    <Sub_Area2>General and Banking</Sub_Area2>
    <SR_Description>Business Partner Number:
    Business Partner Type: UNVs
    First Name: FirstName
    Last Name: LastName</SR_Description>
    <Sub_Area_Aux>79</Sub_Area_Aux>
    <thereis_general>TRUE</thereis_general>
    <thereis_banking>TRUE</thereis_banking>
    <auxGeneric>GDB</auxGeneric>
    <Business_Area_BP>P022</Business_Area_BP>
    <Search_Term_1>FirstName</Search_Term_1>
    <Search_Term_2>LastName</Search_Term_2>
    <Responsible_Institution xsi:nil="true" />
    <Add_Additional_Address xsi:nil="true" />
    <Add_Additional_Communication xsi:nil="true" />
    <BP_Role_Main xsi:nil="true" />
    <BP_Role_Additional xsi:nil="true" />
    <AddresType xsi:nil="true" />
    <Specify xsi:nil="true" />
    <BP_Category xsi:nil="true" />
    <AddRemoveAddress xsi:nil="true" />
    <AddRemoveCommunication xsi:nil="true" />
    <BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
    </General_Data>
    <Primary_Bank_Account>
    <Bank_Location_ID>0001</Bank_Location_ID>
    <Bank_Country>ML</Bank_Country>
    <Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
    <Bank_Account_Type>1</Bank_Account_Type>
    <IBAN xsi:nil="true" />
    <CurrencyPrimaryIBAN xsi:nil="true" />
    <Account_Holder_Name xsi:nil="true" />
    <CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
    <Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
    <NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
    <NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
    <CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
    <NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
    <NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
    <NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
    <NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
    <NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
    <NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
    <NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
    <Primary_Type_of_Account xsi:nil="true" />
    <invisible1>National ID</invisible1>
    <bDontHasBankAccount>false</bDontHasBankAccount>
    <bBankAccountNotAvailable>false</bBankAccountNotAvailable>
    <CashOrCheck xsi:nil="true" />
    <CashAccountingClerk xsi:nil="true" />
    <BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
    <CheckOptions xsi:nil="true" />
    <SameOrDifferent_IBAN_Primary xsi:nil="true" />
    <SameOrDifferent_National_Primary xsi:nil="true" />
    <SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
    <AccountTitle_IBAN_Primary xsi:nil="true" />
    <AccountTitle_National_Primary xsi:nil="true" />
    <AccountTitle_NotIBAN_Primary xsi:nil="true" />
    <ExplainWhy_IBAN_Primary xsi:nil="true" />
    <ExplainWhy_National_Primary xsi:nil="true" />
    <ExplainWhy_NotIBAN_Primary xsi:nil="true" />
    <Bank_Key xsi:nil="true" />
    <Bank_Control_Key xsi:nil="true" />
    <Special_Instructions_IBAN_Primary xsi:nil="true" />
    <Special_Instructions_National_Primary xsi:nil="true" />
    <Special_Instructions_NotIBAN_Primary xsi:nil="true" />
    <RecordTypePrimary xsi:nil="true" />
    <Payment_Method_UnderCashCheck xsi:nil="true" />
    <ValidUntilPrimaryBank xsi:nil="true" />
    </Primary_Bank_Account>
    <Primary_Intermediary_Bank_Account>
    <Intermediary_Bank_Location_ID xsi:nil="true" />
    <Intermediary_Bank_Country xsi:nil="true" />
    <Intermediary_Bank_Account_Number xsi:nil="true" />
    <Intermediary_Bank_Account_Type xsi:nil="true" />
    <Intermediary_IBAN xsi:nil="true" />
    <CurrencyIntermediaryIBAN xsi:nil="true" />
    <Intermediary_Account_Holder_Name xsi:nil="true" />
    <CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
    <Intermediary_Routing_Number_National_ID xsi:nil="true" />
    <IntermediaryNonIbanAccountHolderName xsi:nil="true" />
    <IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
    <CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
    <NonIbanIntermediaryBankAccountType xsi:nil="true" />
    <NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
    <NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
    <NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
    <NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
    <NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
    <NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
    <IntermediaryBankAccountVisible xsi:nil="true" />
    <Intermediary_Type_of_Account xsi:nil="true" />
    <invisible2 xsi:nil="true" />
    <Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
    <SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
    <SameOrDifferent_National_Intermediary xsi:nil="true" />
    <SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
    <AccountTitle_IBAN_Intermediary xsi:nil="true" />
    <AccountTitle_National_Intermediary xsi:nil="true" />
    <AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
    <ExplainWhy_IBAN_Intermediary xsi:nil="true" />
    <ExplainWhy_National_Intermediary xsi:nil="true" />
    <ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
    </Primary_Intermediary_Bank_Account>
    <Additional_Bank_Account>
    <Additional_Bank_Location_ID xsi:nil="true" />
    <Additional_Bank_Country xsi:nil="true" />
    <Additional_Bank_Account_Number xsi:nil="true" />
    <Additional_Bank_Account_Type xsi:nil="true" />
    <Additional_IBAN xsi:nil="true" />
    <CurrencyAdditionalIBAN xsi:nil="true" />
    <Additional_Account_Holder_Name xsi:nil="true" />
    <CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
    <Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
    <AdditionalNonIbanAccountHolderName xsi:nil="true" />
    <AdditionalNonIbanBankAccountNumber xsi:nil="true" />
    <CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
    <NonIbanAdditionalBankAccountType xsi:nil="true" />
    <NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
    <NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
    <NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
    <NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
    <NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
    <NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
    <AdditionalBankAccountVisible xsi:nil="true" />
    <Additional_Type_of_Account xsi:nil="true" />
    <invisible3 xsi:nil="true" />
    <Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
    <SameOrDifferent_IBAN_Additional xsi:nil="true" />
    <SameOrDifferent_National_Additional xsi:nil="true" />
    <SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
    <AccountTitle_IBAN_Additional xsi:nil="true" />
    <AccountTitle_National_Additional xsi:nil="true" />
    <AccountTitle_NotIBAN_Additional xsi:nil="true" />
    <ExplainWhy_IBAN_Additional xsi:nil="true" />
    <ExplainWhy_National_Additional xsi:nil="true" />
    <ExplainWhy_NotIBAN_Additional xsi:nil="true" />
    <Additional_Bank_Key xsi:nil="true" />
    <Additional_Bank_Control_Key xsi:nil="true" />
    <Special_Instructions_IBAN_Additional xsi:nil="true" />
    <Special_Instructions_National_Additional xsi:nil="true" />
    <Special_Instructions_NotIBAN_Additional xsi:nil="true" />
    <RecordTypeAdditional xsi:nil="true" />
    <ValidUntilAdditionalBank xsi:nil="true" />
    </Additional_Bank_Account>
    <Payment_Information>
    <Block_for_payment>1</Block_for_payment>
    <Payment_Method xsi:nil="true" />
    <Accounting_Clerk xsi:nil="true" />
    <PaymentMethodAdditional xsi:nil="true" />
    <AccountingClerkAdditional xsi:nil="true" />
    </Payment_Information>
    <Additional_Field_for_Purchasing_view>
    <Purchase_order_currency>XOF</Purchase_order_currency>
    <BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
    <Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
    <Posting_block_for_company_code xsi:nil="true" />
    <Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
    <Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
    <Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
    <BPRoleDateBegin xsi:nil="true" />
    <BPRoleDateEnd xsi:nil="true" />
    </Additional_Field_for_Purchasing_view>
    <Requestor_Information>
    <Requested_By>REQUESTOR</Requested_By>
    <Org_Unit>MVCON</Org_Unit>
    <Date>2014-05-19</Date>
    <Reason xsi:nil="true" />
    <On_Form xsi:nil="true" />
    <Attached xsi:nil="true" />
    <Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
    <RequestorBusinessArea>P022</RequestorBusinessArea>
    <RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
    <Display_Review_Approval_Section xsi:nil="true" />
    </Requestor_Information>
    <Review_Information>
    <Review_By xsi:nil="true" />
    <Org_Unit xsi:nil="true" />
    <Date xsi:nil="true" />
    </Review_Information>
    <Approval_Information>
    <Approved_By xsi:nil="true" />
    <Org_Unit xsi:nil="true" />
    <Date xsi:nil="true" />
    </Approval_Information>
    <Reception_Information>
    <Received_By xsi:nil="true" />
    <Org_Unit xsi:nil="true" />
    <Date xsi:nil="true" />
    </Reception_Information>
    <Entry_Information>
    <Entered_By xsi:nil="true" />
    <Org_Unit xsi:nil="true" />
    <Date xsi:nil="true" />
    </Entry_Information>
    <Verification_Information>
    <Verified_By xsi:nil="true" />
    <Org_Unit xsi:nil="true" />
    <Date xsi:nil="true" />
    </Verification_Information>
    <Order_Currency>
    <Order_Currency_New xsi:nil="true" />
    </Order_Currency>
    <Change_BP_Group>
    <BP_Group_Existing xsi:nil="true" />
    <BP_Type_Existing xsi:nil="true" />
    <BP_Role_Existing xsi:nil="true" />
    <BP_Group_New xsi:nil="true" />
    <BP_Type_New xsi:nil="true" />
    <BP_Role_New xsi:nil="true" />
    <BPTypeAuxVisible1 xsi:nil="true" />
    <BPTypeAuxVisible2 xsi:nil="true" />
    </Change_BP_Group>
    <Expire_or_Add_Validity_Period_to_BP_Role>
    <Additional_BP_Role_Entry xsi:nil="true" />
    </Expire_or_Add_Validity_Period_to_BP_Role>
    <Add_Alternative_Payees>
    <Additional_Payee xsi:nil="true" />
    </Add_Alternative_Payees>
    <Establish_BP_Relationship>
    <Additional_Relationship_EntryB xsi:nil="true" />
    </Establish_BP_Relationship>
    <Block_BP>
    <PaymentBlock xsi:nil="true" />
    <Reason_Payment_Block xsi:nil="true" />
    <PostingBlock xsi:nil="true" />
    <Reason_Posting_Block xsi:nil="true" />
    <PurchasingBlock xsi:nil="true" />
    <Reason_Purchasing_Block xsi:nil="true" />
    <CentralBlock xsi:nil="true" />
    <Reason_Central_Block xsi:nil="true" />
    <FlagforArchiving xsi:nil="true" />
    <Reason_Flag_Block xsi:nil="true" />
    <TerminateBP xsi:nil="true" />
    <Reason_Terminate_Block xsi:nil="true" />
    </Block_BP>
    <Options>
    <Option1>true</Option1>
    <Option2>false</Option2>
    <Option3>true</Option3>
    <Option4>false</Option4>
    <Option5>false</Option5>
    <Option6>false</Option6>
    <Option7>false</Option7>
    <Option8>false</Option8>
    <Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
    </Options>
    <Sec_Update_BP_Legal_Name>
    <NewLegalFirstName xsi:nil="true" />
    <NewLegalMiddleName xsi:nil="true" />
    <NewLegalLastName xsi:nil="true" />
    </Sec_Update_BP_Legal_Name>
    <line>
    <IDType>
    <IDType xsi:nil="true" />
    <LegacyIDNumber xsi:nil="true" />
    <Responsible_Institution_Legacy xsi:nil="true" />
    <AddRemoveID_R xsi:nil="true" />
    </IDType>
    </line>
    <Address>
    <Section_Address>
    <AddressTypeR xsi:nil="true" />
    <StreetR xsi:nil="true" />
    <StreetR_2 xsi:nil="true" />
    <StreetR_3 xsi:nil="true" />
    <House_NumberR xsi:nil="true" />
    <City_Postal_CodeR xsi:nil="true" />
    <CityR xsi:nil="true" />
    <CountryR xsi:nil="true" />
    <StateRegionProvinceR xsi:nil="true" />
    <PO_BoxR xsi:nil="true" />
    <PO_Box_PostalCodeR xsi:nil="true" />
    <SpecifyR xsi:nil="true" />
    <AddRemoveAddressR xsi:nil="true" />
    </Section_Address>
    <PO_BoxR2>
    <SecPoBoxR2>
    <PO_BoxR2 xsi:nil="true" />
    <PO_Box_Postal_CodeR2 xsi:nil="true" />
    </SecPoBoxR2>
    </PO_BoxR2>
    </Address>
    <Communication>
    <Communication_Section>
    <Telephone_NumberR xsi:nil="true" />
    <Mobile_Phone_NumberR xsi:nil="true" />
    <Fax_NumberR xsi:nil="true" />
    <Email_AddressR xsi:nil="true" />
    <AddRemoveCommunicationR xsi:nil="true" />
    </Communication_Section>
    </Communication>
    <Expire_or_Add_Validaty_to_BP_RoleR>
    <Expire_or_Add_Validaty>
    <BP_RoleR xsi:nil="true" />
    <Expire_or_Add_Validity_PeriodR xsi:nil="true" />
    <Valid_FromR xsi:nil="true" />
    <Valid_ToR xsi:nil="true" />
    </Expire_or_Add_Validaty>
    </Expire_or_Add_Validaty_to_BP_RoleR>
    <Add_Alternative_PayeesR>
    <Alternative_Payees>
    <Add_Update_Remove xsi:nil="true" />
    <Permited_Payee_BP_NumberR xsi:nil="true" />
    <Name_Alt_PayeeR xsi:nil="true" />
    <Index_NumberR xsi:nil="true" />
    <TitleR xsi:nil="true" />
    <First_NameR xsi:nil="true" />
    <Middle_NameR xsi:nil="true" />
    <Last_NameR xsi:nil="true" />
    </Alternative_Payees>
    </Add_Alternative_PayeesR>
    <Establish_BP_RelationshipR>
    <Relationship>
    <BP_Number_Main xsi:nil="true" />
    <Relationship_CategoryR xsi:nil="true" />
    <ValidFromR xsi:nil="true" />
    <ValidToRelationshipR xsi:nil="true" />
    <BPNumber_SecondaryR xsi:nil="true" />
    <Index_Number_Secondary_Relationship xsi:nil="true" />
    <Business_Area_Secondary xsi:nil="true" />
    <Title_Secondary_BP xsi:nil="true" />
    <First_Name_Secondary_BPR xsi:nil="true" />
    <MiddleNameSecondaryBPR xsi:nil="true" />
    <LastNameSecondaryBP xsi:nil="true" />
    <Add_Update_DeleteR xsi:nil="true" />
    </Relationship>
    </Establish_BP_RelationshipR>
    <PO_BoxR>
    <SecPoBoxR>
    <PO_BoxR xsi:nil="true" />
    <PO_Box_Postal_CodeR xsi:nil="true" />
    </SecPoBoxR>
    </PO_BoxR>
    </tns:OF_Forms>'
    ;WITH XMLNAMESPACES ('OF_Messages.Schemas.OF_Forms' AS tns)
    SELECT m.n.value('(Bank_Account_Number)[1]','varchar(100)')
    FROM @x.nodes('/tns:OF_Forms/Primary_Bank_Account')m(n)
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Need to get NULL values!

    Hi,
    I have a query like following...
    SELECT CA.C_PROJECT_ID, SUM(CA.AMTACCTCR - CA.AMTACCTDR) AS AMOUNT
    FROM CUS_ACCTDIM_FACT_ACCT CA
    LEFT JOIN M_PRODUCT MP ON MP.M_PRODUCT_ID = CA.M_PRODUCT_ID
    WHERE MP.PRODUCTTYPE = 'S'
    GROUP BY CA.C_PROJECT_ID;
    Result is:
    PROJECT AMOUNT
    1000087     4175
    1000093     4000
    But I need to get the following result:
    PROJECT AMOUNT
    1000087     4175
    1000088     
    1000089     
    1000090     
    1000091     
    1000092     
    1000093     4000
    I mean I need to get all the project ids but amount should show only to the records that match the condition. Other projects will have null value.
    Can someone help me how to write query to get this output?
    Thanks in advance.

    Kalyogi,
    Based on your information, I created following tables and added but if you can post your tables and some sample data for both then it will be easy to help you in better way.
    But check this test case as it gets desired output you are requesting for, you can run this entire test in your setup and verify
    CREATE TABLE cus_acctdim_fact_acct (
       c_project_id NUMBER,
       amtacctcr NUMBER,
       amtacctdr NUMBER,
       m_product_id NUMBER
    SET DEFINE OFF;
    Insert into TESTME.CUS_ACCTDIM_FACT_ACCT
       (C_PROJECT_ID, AMTACCTCR, AMTACCTDR, M_PRODUCT_ID)
    Values
       (1000087, 4190, 15, 1111);
    Insert into TESTME.CUS_ACCTDIM_FACT_ACCT
       (C_PROJECT_ID, AMTACCTCR, AMTACCTDR, M_PRODUCT_ID)
    Values
       (1000093, 4050, 50, 2222);
    Insert into TESTME.CUS_ACCTDIM_FACT_ACCT
       (C_PROJECT_ID, M_PRODUCT_ID)
    Values
       (1000088, 3333);
    Insert into TESTME.CUS_ACCTDIM_FACT_ACCT
       (C_PROJECT_ID, M_PRODUCT_ID)
    Values
       (1000089, 4444);
    COMMIT;
    CREATE TABLE m_product (
       m_product_id NUMBER,
       producttype VARCHAR2 (1)
       SET DEFINE OFF;
    Insert into TESTME.M_PRODUCT
       (M_PRODUCT_ID, PRODUCTTYPE)
    Values
       (4444, 'S');
    Insert into TESTME.M_PRODUCT
       (M_PRODUCT_ID, PRODUCTTYPE)
    Values
       (3333, 'S');
    Insert into TESTME.M_PRODUCT
       (M_PRODUCT_ID, PRODUCTTYPE)
    Values
       (2222, 'S');
    Insert into TESTME.M_PRODUCT
       (M_PRODUCT_ID, PRODUCTTYPE)
    Values
       (1111, 'S');
    COMMIT;
    SELECT ca.c_project_id, SUM (ca.amtacctcr - ca.amtacctdr) AS amount
    FROM    cus_acctdim_fact_acct ca
         LEFT JOIN
            m_product mp
         ON mp.m_product_id = ca.m_product_id
    WHERE mp.producttype = 'S'
    GROUP BY ca.c_project_id;Regards

  • Newbie needs help comprehending CSS Password Manager functions

    Hello All:
    I own a TP W500 4062-27U running Windows 7 Ultimate.  The computer is trouble-free.
    I am seeking a solution to the following need:  An application that will securely remember my passwords for various websites, etc. and enable me to log in using the fingerprint reader or similar.
    I am aware that Lenovo provides both Fingerprint Reader software and Client Security Solution software, but I don't know whether or not either one (or both) of these applications will provide the functionality I am seeking.  I have spent a fair bit of time looking around the Lenovo website, but cannot find a document that describes (in a general, overview manner) the functionality that CSS provides.
    I don't need to log into VPNs, or company networks, or anything really fancy like that - I just need something that will enable me to log into about 20 different websites, using a different password for each website.  Right now, I'm generally using the same password for every website (that way, I can remember what it is), and as I think you will agree, that is probably not a very good practice so far as security is concerned.
    If anyone could point me towards a document that explains how I can get CSS to do what I want it to do, I would be very grateful.  If CSS does not have the functionality I am seeking, I would very much appreciate a recommendation of software - possibly non-Lenovo - that does provide the functionality I am seeking.
    Thanks very much for your assistance.
    Michael

    Hi PanEuropean2,
    Welcome to Lenovo Forum!
    In regard to your question, Client Security Solution (CSS) should be the right fit for you.
    I have a T410 with Win 7, and have several passwords to remember which is really killing me. However, by using CSS, Fingerprint software and Password Manager, I need to enter all the passwords only once when access a website or a tool, and let it saved in CSS.
    The next time i turn on the machine and open up a website which needs user ID and password, I just need to swipe the fingerprint that I've enrolled, then viola!
    Just take note that after the first swipe of fingerprint, tools or website that are to be accessed later will automatically show the password in the box directly without having to swipe fingerprint again. You just need to click to log in. I"m not sure if this is the experience you're looking for, however, no harm to give it a try.
    Here's the user guide for CSS. It has
    Client Security Solution components
    Client Security Solution installation considerations
    Client Security Solution features
    Hope this helps
    Cheers,
    Cleo
    WW Social Media
    T61, T410, x240, Z500, Flex 14
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Need Basic Materials for Value Mapping Function

    Hi  all,
               Can any one provide Basic Materials for Value Mapping Function???

    Hi Ragu,
    u can chk out this :
    http://help.sap.com/saphelp_nw70/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    Hope ths was helpful.
    kanan

  • I need to return multiple values in function

    create or replace function f (p in varchar2) return varchar2
    is
    a number(10);
    begin
    for loop 1 in 1..10
    select instr('yyyyyyyyynnnnnyynny','y',1,i) into a from dual;
    end loop;
    return a;
    end;
    my function return a value but i need to return multiple values
    thanks in advance

    Dipali Vithalani wrote:
    I understand that OUt parameter should not be used in funtions... Then I am eager to know, why oracle has provided the opton of OUT Parameter in funtion creation ? Hope you can explain that..This is an option is many languages.
    And there is valid use for it. PL/SQL however does not implement the full solution. An OUT parameter is essentially passing parameters by reference and not passing it by value.
    Passing by reference means passing a pointer to the function/procedure to the variable in the caller. This allows the function/procedure to directly reference the value in the caller.
    Passing by value means that the value from the variable in the caller is copied to the stack space of the function/procedure being called. The function/procedure thus has its own local copy of that value.
    That could be a performance and resource problem when the caller has a large data structure and the entire structure needs to be copied from the caller to the called procedure/function. In such a case it is a lot faster (and less memory needed) to simply pass a pointer to that structure to the function/procedure being called.
    And this is basically what an OUT parameter does - it allows PL/SQL code direct access to write into the variable of the calling code.
    In some cases you may have a large data structure, want to pass it by reference, but do not want the function/procedure being called to change it. You do not want to allow it modify your large data structure. You simply want to pass a pointer and allow read access to the function/procedure.
    In other languages, such a parameter is defined as a constant - as constants cannot be changed. So the parameter signature will look something like the following:
    create or replace function FooFunc( largeStruct CONSTANT IN OUT NOCOPY SomeDataType ) return SomeOtherDataType is ..And this is the only time that you should use an OUT parameter (passing by reference) in a function - when the function parameter is a large data structure. At the same time, the function is disallowed from changing that OUT parameter. It is passed as an OUT parameter simply to increase call performance and reduce memory requirements.
    PL/SQL unfortunately does not support this - allowing a value to be passed as a constant reference.
    As for why PL/SQL supports it the way it does - it does not mean that because PL/SQL supports OUT parameters for functions, it should be used. PL/SQL also supports the GoTo statement. Simply because it supports a specific feature does not mean that it is a good idea to use it.

  • Need help with usage of static functions

    Hi,
    I tried instantiating objects within static functions as follows: It gives error:
    If someone can explain an alternate way of doing things, I would appreciate:
    public class C {
    * @param args
    public static void main(String[] args) {
    Y.Fn1();
    public class X {
    public void Fn2(){
    int b=2;
    System.out.println("hello");
    public class Y {
    public static void Fn1()
    int a=2;
    X obj = new X();
    obj.Fn2();
    The actual error is:
    Cannot make a static referencxe to the nonstatic method Fn2() from the type X Y.java
    Need Help : If someone can comment on the following, I would appreciate:
    I have a class Session, which has a method ProcessEvent()
    public class Session{
    public synchronized void processEvent(Event e)
    // Processing of the event
    // Generate a response for the Event
    This Session class is the mainstream code..
    Now I want to write a TestClass that will test the main code.
    So I have a Test class as below:
    public class Test {
    public static void sendReq()
    // Construct an event and call processEvent Function from the main code
    Event ev = new Event();
    // Fill the event with parameters
    Session sess = new Session();
    sess.processEvent(ev);
    What I am thinking of doing is: Call the static method in another class called Manager of the mainstream code for test purpose as follows:
    public class Manager {
    public void somefunction()
    //*** Just for test purpose: do the following line **//
    Test.sendReq();
    I am not sure what I am trying to do will work. I would appreciate if you can comment on that or suggest something that would work for me.
    Another thing which I want to do is:
    Inside ProcessEvent(), I want to call another static method ParseandValidateResponse() of the TestClass This looks odd, but as long as it works, it would be fine for me because this is only for test purpose.
    In this case, I would write,
    public class Session{
    public synchronized void processEvent(Event e)
    // Processing of the event
    // Generate a response for the Event
    Test.parseandValidateResponse(Response res);
    public class Test {
    public static void sendReq()
    // AS SHOWN PREVIOUSLY
    public static void parseandValidateResponse(Response resp)
    // validate the response
    }

    Sorry I thought no one had replied. When I posted here, I missed seeing yr reply. Later just now I saw yr reply It was in the second Page
    (Earlier I was looking only in first page by mistake)
    Meena

  • Urgent help on null values

    hi
    every body
    i hope some body might have faced similar problem
    i have a database retrival problem and i am getting the values in the last row of the table,
    But the problem is if the value stored is "NULL" my program and application hangs
    can any body tell me how to handle this
    thanks in advance

    Hi Anilkumar
    if u r trying to retrieve from database then u must be using resultset to get the data. ResultSet has a method called wasNull() which returns boolean when the last column read had a value of SQL NULL. This shud solve your problem. If u get a null value dont process that column.
    -vinucon

  • Need Help Please: Audigy2 Value conflict with onboard sound

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

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

  • Need help summing row values based on several elements

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

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

  • Need help in extracting value from an xml tag.

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

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

  • I need help passing a value to a method.

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

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

Maybe you are looking for