XML in a varchar

Hello to everybody.
First of all, sorry for my english.
I have to make a PL, where in someplace I have a varchar with this content:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><HelloWorldResponse xmlns="http://prueba/LlamadaPLWS"><HelloWorldResult>prueba</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>
Any idea of how can a get the content of the 'HelloWorldResult' tag inside the PL???
In this case it would be 'prueba'.
As you can imagine, I´m a novice in this area.
Thanks a lot in advance.

It involves converting your data to an XMLTYPE and then using EXTRACT to pull out the information you need. You can do this either in PL/SQL or SQL. Many examples from just this year can be found here.

Similar Messages

  • How to use XQuery Exist() Function on a SSIS XML file

    I have a Package Inventory table that has an XML Column named CurrentPackageXML. This XML column contains the SSIS Package XML. I need to use the XQuery Exist() function to determine if the
    errorRowDisposition="IgnoreFailure" exists.
    Below I have a basic SQL statement, but I have no idea how to write the Correct XQuery Expression. In my example below, I just tried to see if the DTS:Name Property existed, but that XQuery Expression is invalid also. It is not what I need in the end, but
    I was just trying to get anything to work.
    Below my SQL, I have included a snip-it of the SSIS package XML where I can find the errorRowDisposition. It is to the far right, so you may have to scroll to the right to see it. I bolded the text so it is easier to find.
    Finally, once I have got a SQL statement that checks if errorRowDisposition exists = False, I need to check for every occurrence of  errorRowDisposition exists = False.
    Would there be an easier way to do this by converting the XML to a varchar(max) then searching for all instances of  errorRowDisposition exists = False?
    SELECT CurrentPackageXML.exist('/DTS:Executable/DTS:Property[DTS:Name]')
    FROM [dbo].[PackageInventory]
    <inputs>
    <input id="43" name="OLE DB Destination Input" description="" hasSideEffects="true" dangling="false" errorOrTruncationOperation="Insert" errorRowDisposition="FailComponent" truncationRowDisposition="NotUsed">
    <inputColumns>
    <inputColumn id="113" name="" description="" lineageId="110" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="95" mappedColumnId="0" />
    <inputColumn id="172" name="" description="" lineageId="167" usageType="readOnly" errorOrTruncationOperation="" errorRowDisposition="NotUsed" truncationRowDisposition="NotUsed" externalMetadataColumnId="94" mappedColumnId="0" />
    </inputColumns>
    <externalMetadataColumns isUsed="True">
    <externalMetadataColumn id="50" name="DateCreated" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="51" name="ProcessedCount" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="52" name="ErrorCount" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="90" name="AcknowledgementID" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="91" name="Date" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="92" name="FileSeqNumber" description="" precision="0" scale="0" length="0" dataType="i4" codePage="0" mappedColumnId="0" />
    <externalMetadataColumn id="93" name="FileType" description="" precision="0" scale="0" length="50" dataType="str" codePage="65001" mappedColumnId="0" />
    <externalMetadataColumn id="94" name="FileName" description="" precision="0" scale="0" length="50" dataType="str" codePage="65001" mappedColumnId="0" />
    <externalMetadataColumn id="95" name="DateReceived" description="" precision="0" scale="0" length="0" dataType="dbTimeStamp" codePage="0" mappedColumnId="0" />
    </externalMetadataColumns>
    </input>
    </inputs>
    Ryan P. Casey • <a href="http://www.R-P-C-Group.com">www.R-P-C-Group.com</a>

    Try this and let know what errors you get.  Note, this is a rough draft of one of a series of queries that I have started writing to document SSIS using SQL XQuery.  I read a file in my version (the one I tested) and get the results.
    -- Get the flat file destinations and their mappings
    with xmlnamespaces ('www.microsoft.com/SqlServer/Dts' as DTS
    ), compflow as (
    SELECT
    task.xml.value('@DTS:ObjectName', 'varchar(200)') as TaskName
    , task.xml.value('@DTS:ExecutableType', 'varchar(200)') as TaskType
    , task.xml.value('@DTS:refId', 'varchar(1000)') as TaskRefId
    --, task.xml.query ('.') as Node
    , component.xml.value ('@name', 'varchar(200)') as ComponentName
    , component.xml.value ('@refId', 'varchar(1000)') as ComponentRefId
    , component.xml.value ('@componentClassID', 'varchar(1000)') AS componentClassID
    --, component.xml.value ('count(inputs/input)', 'int') AS NumberOfInputs
    --, component.xml.value ('count(outputs/output)', 'int') AS NumberOfOutputs
    --, component.xml.value ('count(outputs/output[@isErrorOut="true"])', 'int') AS NumberOfErrorOutputs
    , component.xml.query('.') as ComponentNode
    FROM [dbo].[PackageInventory] pk
    cross apply pk.CurrentPackageXML.nodes('//DTS:Executable[@DTS:ExecutableType="Microsoft.Pipeline"]') as task (xml)
    OUTER APPLY task.xml.nodes('DTS:ObjectData/pipeline/components/component') as component (xml)
    WHERE [PackageInventory_ID] = 13
    , inputNode as (
    SELECT c.*
    , input.xml.value ('@name', 'varchar(200)') as InputName
    , input.xml.value ('@refId', 'varchar(1000)') as InputRefId
    , input.xml.value ('@hasSideEffects', 'varchar(1000)') as InputHasSideEffects
    , input.xml.value ('count(inputColumns/inputColumn)', 'int') AS NumberOfInputColumns
    , input.xml.value ('count(externalMetadataColumns/externalMetadataColumn)', 'int') AS NumberOfExternalMetadataColumns
    , input.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as InputerrorOrTruncationOperation
    , input.xml.value ('@errorRowDisposition', 'varchar(1000)') as InputerrorRowDisposition
    , col.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as InputColumnErrorOrTruncationOperation
    , col.xml.value ('@errorRowDisposition', 'varchar(1000)') as InputColumnErrorRowDisposition
    from compFlow c
    OUTER APPLY c.ComponentNode.nodes ('component/inputs/input') as input (xml)
    OUTER APPLY input.xml.nodes ('inputColumns/inputColumn') as col (xml)
    , inputAnal as (
    select
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,InputName
    ,InputRefId
    ,InputHasSideEffects
    , Null as IsError
    ,NumberOfInputColumns
    ,NumberOfExternalMetadataColumns
    ,InputerrorOrTruncationOperation
    ,InputerrorRowDisposition
    ,InputColumnErrorOrTruncationOperation
    ,InputColumnErrorRowDisposition
    , count(*) as NumRec
    from inputNode
    group by TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,InputName
    ,InputRefId
    ,InputHasSideEffects
    ,NumberOfInputColumns
    ,NumberOfExternalMetadataColumns
    ,InputerrorOrTruncationOperation
    ,InputerrorRowDisposition
    ,InputColumnErrorOrTruncationOperation
    ,InputColumnErrorRowDisposition
    , xoutputNode as (
    SELECT
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    , xout.xml.value ('@name', 'varchar(200)') as OutputName
    , xout.xml.value ('@refId', 'varchar(1000)') as OutputRefId
    , xout.xml.value ('@hasSideEffects', 'varchar(1000)') as OutputHasSideEffects
    , xout.xml.value ('@isErrorOut', 'varchar(1000)') as OutputIsError
    , xout.xml.value ('count(outputColumns/outputColumn)', 'int') AS NumberOfOutputColumns
    , xout.xml.value ('count(externalMetadataColumns/externalMetadataColumn)', 'int') AS NumberOfExternalMetadataColumns
    , xout.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as OutputerrorOrTruncationOperation
    , xout.xml.value ('@errorRowDisposition', 'varchar(1000)') as OutputerrorRowDisposition
    , col.xml.value ('@errorOrTruncationOperation', 'varchar(1000)') as OutputColumnErrorOrTruncationOperation
    , col.xml.value ('@errorRowDisposition', 'varchar(1000)') as OutputColumnErrorRowDisposition
    from compFlow c
    OUTER APPLY c.ComponentNode.nodes ('component/outputs/output') as xout (xml)
    OUTER APPLY xout.xml.nodes ('outputColumns/outputColumn') as col (xml)
    , outputAnal as(
    select
    TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,OutputName
    ,OutputRefId
    ,OutputHasSideEffects
    ,OutputIsError
    ,NumberOfOutputColumns
    ,NumberOfExternalMetadataColumns
    ,OutputerrorOrTruncationOperation
    ,OutputerrorRowDisposition
    ,OutputColumnErrorOrTruncationOperation
    ,OutputColumnErrorRowDisposition
    , count (*) as NumberOfRows
    from xoutputNode
    group by TaskName
    ,TaskType
    ,TaskRefId
    ,ComponentName
    ,ComponentRefId
    ,componentClassID
    ,OutputName
    ,OutputRefId
    ,OutputHasSideEffects
    ,OutputIsError
    ,NumberOfOutputColumns
    ,NumberOfExternalMetadataColumns
    ,OutputerrorOrTruncationOperation
    ,OutputerrorRowDisposition
    ,OutputColumnErrorOrTruncationOperation
    ,OutputColumnErrorRowDisposition
    select 'Input' as RowType, i.* from inputAnal i
    union all
    select 'Output' as RowType, o.* from outputAnal o
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Does anyone can help me to import XML string into a ORACLE database

    Hi guys!
    i have some problem that my friend wants me to convert XML string to Oracle relational database which means.
    let's say, there is a table that a row has XML string.
    so table has XML string with varchar type.
    what my friend want me to do is, the string needs to be solved as a relational database.
    like
    A table has 'ID', 'data', 'result' rows
    and Data column has XML string like <?xml version...............>
    then wants to convert that data column's XML data into TABLE B with structure normally XML has.
    i'm so confused and have no idea at all.. also i couldn't find any solution related to my stuff..
    if someone knows how to solve the problem, just let us know
    thx

    The database is 10.2.0
    What sort of example do u want me to give you..
    i thought i give all information on the post..
    i will explain it
    let's say there are 3 columns ID,Name,Code
    Id = normal integer
    Name= varchar
    Code= varchar
    and i need to conver that XML in the Code column into relational databases
    the code column has normal XML code which is starting from <?xml version.... and so on
    so does it explain?
    please help me!

  • Read XML field.....

    Seems I keep finding different xml data and ways to read it but can't find anything related to what I have to read (<Report Type="?").   I need to retrieve all
    ReasonForLeaving based on "OH xxx-212" from a table called
    Report and the field name is ReportType.  Can someone please help?
    Here are some ReportType field values:
    <Report Type="OH xxx-212">
      <ClaimantName>Alfred E. Newman</ClaimantName>
      <ReasonForLeaving>Starting new magazine</ReasonForLeaving>
     </Report>
    <Report Type="CA xxx-233">
      <ClaimantName>Bernard Kaputnick</ClaimantName>
      <ReasonForLeaving>Discovered new page</ReasonForLeaving>
     </Report>
    <Report Type="OH xxx-212">
      <ClaimantName>Tim Whatley</ClaimantName>
      <ReasonForLeaving>Changing career</ReasonForLeaving>
     </Report>
    <Report Type="NM xxx-666">
      <ClaimantName>Walter White</ClaimantName>
      <ReasonForLeaving>Found new lab</ReasonForLeaving>
     </Report>

    I am not sure if I understand the problem properly or not but
    Can you not create a tabular structure of your XML and then query the data you are looking for?
    Declare @vXML XML
    Declare @vXMLString varchar(max)='<Report Type="OH xxx-212">
    <ClaimantName>Alfred E. Newman</ClaimantName>
    <ReasonForLeaving>Starting new magazine</ReasonForLeaving>
    </Report>
    <Report Type="CA xxx-233">
    <ClaimantName>Bernard Kaputnick</ClaimantName>
    <ReasonForLeaving>Discovered new page</ReasonForLeaving>
    </Report>
    <Report Type="OH xxx-212">
    <ClaimantName>Tim Whatley</ClaimantName>
    <ReasonForLeaving>Changing career</ReasonForLeaving>
    </Report>
    <Report Type="NM xxx-666">
    <ClaimantName>Walter White</ClaimantName>
    <ReasonForLeaving>Found new lab</ReasonForLeaving>
    </Report>'
    --Prepare it
    Set @vXML=Cast('<?xml version="1.0" encoding="utf-8"?><Reports>'+@vXMLString+'</Reports>' as XML)
    DECLARE @hdoc INT
    Declare @vDummy Table(id int,parentid int,nodetypr int,localname varchar(100),prefix varchar(100),namespaceuri varchar(100),datatype varchar(100), prev int,text varchar(1000))
    EXEC sp_xml_preparedocument @hdoc OUTPUT,@vXML
    insert Into @vDummy
    SELECT *
    FROM OPENXML( @hdoc, '//*',2)
    exec sp_xml_removedocument @hdoc
    --Tabular Format
    Select ParentData.Parentid,
    ParentData.ParentName,
    ParentData.ChildID,
    ParentData.ChildNaMe,
    ChildData.Text
    From
    (Select Parent.id Parentid,parent.localname ParentName,child.id ChildID,child.localname ChildNaMe,child.text
    From @vDummy child,@vDummy parent
    Where Child.parentid=parent.id) ParentData,
    (Select Parent.id Parentid,parent.localname ParentName,child.id ChildID,child.localname ChildNaMe,child.text
    From @vDummy child,@vDummy parent
    Where Child.parentid=parent.id) ChildData
    Where ParentData.ChildNaMe=ChildData.ParentName
    And ChildData.ChildNaMe='#text'
    And ParentData.ChildID=ChildData.Parentid

  • How to pass a string varaible to an internal table field

    Hi Experts,
    I am reading notes/text entries by calling read_text and then passing them in a variable. I want to display the notes. But even after declaring the variable as  LINE2048, it is displaying only 255characters as output length.
    My code:
    TYPES: BEGIN OF TYP_FINAL,
             PARTNER_NO      TYPE BU_PARTNER,         "Partner No.
            OBJECT_ID       TYPE CRMT_OBJECT_ID_DB,  "Object ID
            PROCESS_TYPE    TYPE CRMT_PROCESS_TYPE,  "Activity Type
           ACTUAL_NOTE     TYPE LINE2048,           "Actual Notes
           END OF TYP_FINAL.
    data : T_FINAL           TYPE STANDARD TABLE OF TYP_FINAL,
              WA_FINAL          TYPE TYP_FINAL.
    data:  v_actualnote     TYPE LINE2048.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                        = SY-MANDT
                  ID                            = C_0002
                  LANGUAGE                      = sy-langu
                  NAME                          = l_name1
                  OBJECT                        = C_BUT000
                TABLES
                  LINES                         = t_line
               EXCEPTIONS
                 ID                            = 1
                 LANGUAGE                      = 2
              IF SY-SUBRC = 0.
               clear: v_accountnote.
               LOOP AT T_LINE INTO WA_LINE.
                 CONCATENATE v_accountnote wa_line INTO v_accountnote SEPARATED BY space.
                 clear: wa_line.
               ENDLOOP.
              wa_final-account_note = v_accountnote.
              clear: v_accountnote.
             ENDIF.
    So, if I make the v_actualnote as string and pass it to a string variable, that should work.
    But the system is not allowing me to declare a string varaible inside the internal table.
    Please let me know how to display more than 255 characters in v_accountnote  .
    Regards,
    Sangeeta.

    you are passng that as a string = '5,6' does not exist
    try this : http://www.mssqltips.com/sqlservertip/1771/splitting-delimited-strings-using-xml-in-sql-server/
    declare @table table(sno int)
    insert into @table values(5),(6)
    DECLARE @xml as xml,@txtSchedule as varchar(100),@delimiter as varchar(10)
    SET @txtSchedule='5,6'
    SET @xml = cast(('<X>'+replace(@txtSchedule,',','</X><X>')+'</X>') as xml)
    select * from @table WHERE sno IN ( select N.value('.', 'varchar(10)') as value FROM @xml.nodes('X') as T(N))
    Hope it Helps!!

  • Table Spool (Lazy Spool) & Hash Match (Aggregate) killing performance.

    Hi Folks,
    I have a query that takes about 5 minutes and I am not sure where the issue is. Is there anyway someone can give an insight to this query plan please? Here are the tables and indexes definitions:
    -----Table 1
    CREATE TABLE [dbo].[PropVal](
    [Item] [nvarchar](16) NOT NULL,
    [Symbol] [nvarchar](23) NOT NULL,
    [Date] [smalldatetime] NOT NULL,
    [Value] [nvarchar](max) NOT NULL
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    CREATE UNIQUE CLUSTERED INDEX [PropVal_PK] ON [dbo].[PropVal]
    [Symbol] ASC,
    [Item] ASC
    )GO
    -----Table 2
    CREATE TABLE [dbo].[Crons](
    [CronID] [nvarchar](23) NOT NULL,
    [Date] [smalldatetime] NOT NULL,
    [XMLBlob] [xml] NOT NULL,
    PRIMARY KEY CLUSTERED ([CronID] ASC )
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    CREATE NONCLUSTERED INDEX [test_idx_crons] ON [dbo].[Crons]
    ( [Date] ASC )
    INCLUDE ( [CronID]) 
    GO
    below is the script 
    SELECT  'CLIENTIDS' AS Item
      , Symbol
      , CONVERT(NCHAR(8), GETUTCDATE(), 112) AS Date
      , STUFF(CAST(( SELECT DISTINCT
                            ',' + [Value]
          FROM   DBO.PropVal WITH (NOLOCK)
          WHERE  [Symbol] IN (
                 SELECT DISTINCT
                        ( [Value] )
                 FROM    DBO.PropVal WITH (NOLOCK)
                 WHERE   [Item] = 'USERID'
                         AND [Value] NOT LIKE 'RIMES-%'
                         AND [Symbol] IN (
                              SELECT  DISTINCT a.[Symbol]
                              FROM    DBO.PropVal a, DBO.Crons b WITH (NOLOCK)
                              WHERE   a.[Item] = 'SYSTEM'
                                      AND a.[Symbol] = SUBSTRING(b.[CronID],1,CHARINDEX('.',b.[CronID])-1)
                                      AND b.[Date] > DATEADD(MONTH,-1,GETUTCDATE())
                                     AND a.[Value] = symbols.Symbol ) )
                         AND [Item] = 'CLIENTID'
                 FOR
                    XML PATH('')
                 ) AS varchar(MAX)), 1, 1, '') AS Value
    FROM    ( SELECT DISTINCT
                        [Value] AS Symbol
              FROM      DBO.PropVal WITH (NOLOCK)
              WHERE     [Item] = 'SYSTEM'
              AND       [Value] LIKE 'SYS-%'
            ) AS symbols
    UNION ALL
    SELECT  'USERIDS' AS Item
      , Symbol
      , CONVERT(NCHAR(8), GETUTCDATE(), 112) AS Date
      , STUFF(CAST(( SELECT DISTINCT
                            ',' + [Value]
          FROM   DBO.PropVal WITH (NOLOCK)
          WHERE  [Symbol] IN (
                 SELECT  [Symbol]
                 FROM    DBO.PropVal WITH (NOLOCK)
                 WHERE   [Item] = 'SYSTEM'
                         AND [Value] = symbols.Symbol )
          AND [Item] = 'USERID'
          AND [Value] NOT LIKE 'RIMES%'
          FOR
             XML PATH('')
          ) AS varchar(MAX)), 1, 1, '') AS Value
    FROM    ( SELECT DISTINCT
                        [Value] AS Symbol
              FROM      DBO.PropVal WITH (NOLOCK)
              WHERE     [Item] = 'SYSTEM'
              AND       [Value] LIKE 'SYS-%'
            ) AS symbols;

    Not that this is a fix to performance, but this query may not be doing what you want.  About 11 lines into the query you have a WHERE clause that reads
    WHERE [Item] = 'USERID'
    AND [Value] NOT LIKE 'RIMES-%'
    AND [Symbol] IN (
    SELECT DISTINCT a.[Symbol]
    FROM DBO.PropVal a, DBO.Crons b WITH (NOLOCK)
    WHERE a.[Item] = 'SYSTEM'
    AND a.[Symbol] = SUBSTRING(b.[CronID],1,CHARINDEX('.',b.[CronID])-1)
    AND b.[Date] > DATEADD(MONTH,-1,GETUTCDATE())
    AND a.[Value] = symbols.Symbol ) )
    AND [Item] = 'CLIENTID'
    Notice that that is of the form
    WHERE [Item] = 'USERID'
    AND <some other stuff>
    AND [Item] = 'CLIENTID'
    So, since no row can have Item = 'USERID' and have Item = 'CLIENTID', whis WHERE clause will never return any rows.
    Tom

  • How to pass a string into an IN statement

    I want to run an update command where the user types in  a CSV value and the query runs.  If I simulate 1 number it works, but if I put in 2 variable it returns nothing (but doesn't fail)  any idea what I am doing wrong?
    declare @SITE_ID int
    declare @txtSchedule varchar (500)
    set @SITE_ID=1
    set @txtSchedule='5,6'
    select * from Schedules WHERE SITE_ID=@SITE_ID and WEEK IN(@txtSchedule )
    Jim

    you are passng that as a string = '5,6' does not exist
    try this : http://www.mssqltips.com/sqlservertip/1771/splitting-delimited-strings-using-xml-in-sql-server/
    declare @table table(sno int)
    insert into @table values(5),(6)
    DECLARE @xml as xml,@txtSchedule as varchar(100),@delimiter as varchar(10)
    SET @txtSchedule='5,6'
    SET @xml = cast(('<X>'+replace(@txtSchedule,',','</X><X>')+'</X>') as xml)
    select * from @table WHERE sno IN ( select N.value('.', 'varchar(10)') as value FROM @xml.nodes('X') as T(N))
    Hope it Helps!!

  • Character is changed from ≤ to =

    When I run the following stored procedure with the exec statement following it, the ≤ character is changed to =
    Thanks for any suggestions to fix this.
    Create PROCEDURE [dbo].[XML_ADDJQTEST]
    @objectName
    varchar(255),
    @xml Text,
    @nodeType
    varchar(10),
    @retval
    int output
    AS
    INSERT INTO dbo.XML
    object_Name,
    xml,
    nodeType
    VALUES
    @objectName,
    @xml,
    @nodeType
    Select @retval=@@ROWCOUNTCreate PROCEDURE [dbo].[XML_ADDJQTEST]
    @objectName
    varchar(255),
    @xml varchar(500),
    @nodeType
    varchar(10),
    @retval
    int output
    AS
    INSERT INTO dbo.XML
    object_Name,
    xml,
    nodeType
    VALUES
    @objectName,
    @xml,
    @nodeType
    Select @retval=@@ROWCOUNT
    exec XML_ADDJQTEST @objectName = 'jqtest2', @xml = '<test>(ADT ≤ 400)</test>',  @nodeType= 'short', @retVal=''

    >I am managing a system that uses this 'xml' table, with the xml field that is actually 'text', and it is a very critical part of the system.
    >How difficult do you think it would be to make this change to this table?
    1) Identify all the code that accesses this table, so you know what to test after making the change.
    2) Decide if you want to use NVARCHAR(MAX) or XML
    If you store it as XML then you can query inside the document with TSQL, but you have to parse the document on load.  So useful, but more expensive on load. 
    3) Decide if you want to store the XML documents inline in the table, or push them entirely off row.
    use
    exec sp_tableoption 'xml', 'large value types out of row', 1
    To force the documents entirely off row, leaving only a pointer on the row.  This gives you more rows per page, improving the performance of queries that hit this table but don't need to read the document body, but requires an extra IO to read small
    documents which would otherwise be stored inline in the row.
    Change the data type.  This is simple, but can be expensive if the table is very large.  eg
    alter table XML alter column xml nvarchar(max)
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to pass a Statement to BLOB

    i find this help and i show that very people
    have the same problem.
    if somebody of yours know how to transform
    a Statement to BLOB .
    thank

    you are passng that as a string = '5,6' does not exist
    try this : http://www.mssqltips.com/sqlservertip/1771/splitting-delimited-strings-using-xml-in-sql-server/
    declare @table table(sno int)
    insert into @table values(5),(6)
    DECLARE @xml as xml,@txtSchedule as varchar(100),@delimiter as varchar(10)
    SET @txtSchedule='5,6'
    SET @xml = cast(('<X>'+replace(@txtSchedule,',','</X><X>')+'</X>') as xml)
    select * from @table WHERE sno IN ( select N.value('.', 'varchar(10)') as value FROM @xml.nodes('X') as T(N))
    Hope it Helps!!

  • Load of XML datstore fails after change of PK in from numeric to varchar

    I am facing the following problem.
    I am trying to load an XML datastore (target) from an Oracle table (source) via an interface.
    The primary key in the Oracle table is of data type varchar. However, the primary key in the XML datastore after reverse engineering is created as datatype numeric. When I change the data type of the XML data store PK from numeric to varchar and then execute the interface the load fails with error:
    Wrong data type for input string.
    Taking the geo_dim.xml in the ODI demo folder as an example I take the following steps:
    - I reverse engineered the geo_dim XML that creates amongst other things the Country datastore in the XML model
    - When reverse engineering, ODI adds surrogate PK keys to the XML datastore. These are of data type numeric.
    - I change this surrogate PK key to data type varchar via the ODI designer and load the XML via an Interface from an Oracle source table that has a PK of type varchar.
    - The load of the XML datastore fails with the error "Wrong data type for input string."
    Looks like a bug to me. Any ideas?
    Thanks
    uli

    I figured this one out myself. As part of the JDBC URL you can submit a parameter ni. If set to false this will generate FKs and PKs as varchar.
    It's in the documentation:
    numeric_id or ni
    No
    boolean (true | false)
    true
    If set to true, all internal Primary and Foreign Keys are of NUMERIC type. Otherwise, they are of the VARCHAR type.

  • Can we write query in xml file to get desired field?

    I have  XML script like  below  can I query this file and get returns like Name only  for instance similar to 'select top 5 name from [HumanResources].[Department] order by DepartmentID'
    Engineering
    Tool Design
    Sales
    Marketing
    Purchasing
    <HumanResources.Department DepartmentID="1" Name="Engineering" GroupName="Research and Development" ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="2" Name="Tool Design" GroupName="Research and Development" ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="3" Name="Sales" GroupName="Sales and Marketing" ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="4" Name="Marketing" GroupName="Sales and Marketing" ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="5" Name="Purchasing" GroupName="Inventory Management" ModifiedDate="2002-06-01T00:00:00" />

    DECLARE @xml xml='<HumanResources.Department DepartmentID="1" Name="Engineering" GroupName="Research and Development"
     ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="2" Name="Tool Design" 
    GroupName="Research and Development" ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department 
    DepartmentID="3" Name="Sales" GroupName="Sales and Marketing" ModifiedDate="2002-06-01T00:00:00" />
    <HumanResources.Department DepartmentID="4" Name="Marketing" GroupName="Sales and Marketing" 
    ModifiedDate="2002-06-01T00:00:00" /><HumanResources.Department DepartmentID="5" Name="Purchasing" 
    GroupName="Inventory Management" ModifiedDate="2002-06-01T00:00:00" />'
    SELECT T.Name.value('@Name', 'VARCHAR(50)') AS Name
    FROM @xml.nodes('HumanResources.Department')
     AS T(Name);
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Selective XML Index feature is not supported for the current database version , SQL Server Extended Events , Optimizing Reading from XML column datatype

    Team , Thanks for looking into this  ..
    As a last resort on  optimizing my stored procedure ( Below ) i wanted to create a Selective XML index  ( Normal XML indexes doesn't seem to be improving performance as needed ) but i keep getting this error within my stored proc . Selective XML
    Index feature is not supported for the current database version.. How ever
    EXECUTE sys.sp_db_selective_xml_index; return 1 , stating Selective XML Indexes are enabled on my current database .
    Is there ANY alternative way i can optimize below stored proc ?
    Thanks in advance for your response(s) !
    /****** Object: StoredProcedure [dbo].[MN_Process_DDLSchema_Changes] Script Date: 3/11/2015 3:10:42 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- EXEC [dbo].[MN_Process_DDLSchema_Changes]
    ALTER PROCEDURE [dbo].[MN_Process_DDLSchema_Changes]
    AS
    BEGIN
    SET NOCOUNT ON --Does'nt have impact ( May be this wont on SQL Server Extended events session's being created on Server(s) , DB's )
    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
    select getdate() as getdate_0
    DECLARE @XML XML , @Prev_Insertion_time DATETIME
    -- Staging Previous Load time for filtering purpose ( Performance optimize while on insert )
    SET @Prev_Insertion_time = (SELECT MAX(EE_Time_Stamp) FROM dbo.MN_DDLSchema_Changes_log ) -- Perf Optimize
    -- PRINT '1'
    CREATE TABLE #Temp
    EventName VARCHAR(100),
    Time_Stamp_EE DATETIME,
    ObjectName VARCHAR(100),
    ObjectType VARCHAR(100),
    DbName VARCHAR(100),
    ddl_Phase VARCHAR(50),
    ClientAppName VARCHAR(2000),
    ClientHostName VARCHAR(100),
    server_instance_name VARCHAR(100),
    ServerPrincipalName VARCHAR(100),
    nt_username varchar(100),
    SqlText NVARCHAR(MAX)
    CREATE TABLE #XML_Hold
    ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY , -- PK necessity for Indexing on XML Col
    BufferXml XML
    select getdate() as getdate_01
    INSERT INTO #XML_Hold (BufferXml)
    SELECT
    CAST(target_data AS XML) AS BufferXml -- Buffer Storage from SQL Extended Event(s) , Looks like there is a limitation with xml size ?? Need to re-search .
    FROM sys.dm_xe_session_targets xet
    INNER JOIN sys.dm_xe_sessions xes
    ON xes.address = xet.event_session_address
    WHERE xes.name = 'Capture DDL Schema Changes' --Ryelugu : 03/05/2015 Session being created withing SQL Server Extended Events
    --RETURN
    --SELECT * FROM #XML_Hold
    select getdate() as getdate_1
    -- 03/10/2015 RYelugu : Error while creating XML Index : Selective XML Index feature is not supported for the current database version
    CREATE SELECTIVE XML INDEX SXI_TimeStamp ON #XML_Hold(BufferXml)
    FOR
    PathTimeStamp ='/RingBufferTarget/event/timestamp' AS XQUERY 'node()'
    --RETURN
    --CREATE PRIMARY XML INDEX [IX_XML_Hold] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index
    --SELECT GETDATE() AS GETDATE_2
    -- RYelugu 03/10/2015 -Creating secondary XML index doesnt make significant improvement at Query Optimizer , Instead creation takes more time , Only primary should be good here
    --CREATE XML INDEX [IX_XML_Hold_values] ON #XML_Hold(BufferXml) -- Ryelugu 03/09/2015 - Primary Index , --There should exists a Primary for a secondary creation
    --USING XML INDEX [IX_XML_Hold]
    ---- FOR VALUE
    -- --FOR PROPERTY
    -- FOR PATH
    --SELECT GETDATE() AS GETDATE_3
    --PRINT '2'
    -- RETURN
    SELECT GETDATE() GETDATE_3
    INSERT INTO #Temp
    EventName ,
    Time_Stamp_EE ,
    ObjectName ,
    ObjectType,
    DbName ,
    ddl_Phase ,
    ClientAppName ,
    ClientHostName,
    server_instance_name,
    nt_username,
    ServerPrincipalName ,
    SqlText
    SELECT
    p.q.value('@name[1]','varchar(100)') AS eventname,
    p.q.value('@timestamp[1]','datetime') AS timestampvalue,
    p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') AS objectname,
    p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') AS ObjectType,
    p.q.value('(./action[@name="database_name"]/value)[1]','varchar(100)') AS databasename,
    p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') AS ddl_phase,
    p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') AS clientappname,
    p.q.value('(./action[@name="client_hostname"]/value)[1]','varchar(100)') AS clienthostname,
    p.q.value('(./action[@name="server_instance_name"]/value)[1]','varchar(100)') AS server_instance_name,
    p.q.value('(./action[@name="nt_username"]/value)[1]','varchar(100)') AS nt_username,
    p.q.value('(./action[@name="server_principal_name"]/value)[1]','varchar(100)') AS serverprincipalname,
    p.q.value('(./action[@name="sql_text"]/value)[1]','Nvarchar(max)') AS sqltext
    FROM #XML_Hold
    CROSS APPLY BufferXml.nodes('/RingBufferTarget/event')p(q)
    WHERE -- Ryelugu 03/05/2015 - Perf Optimize - Filtering the Buffered XML so as not to lookup at previoulsy loaded records into stage table
    p.q.value('@timestamp[1]','datetime') >= ISNULL(@Prev_Insertion_time ,p.q.value('@timestamp[1]','datetime'))
    AND p.q.value('(./data[@name="ddl_phase"]/text)[1]','varchar(100)') ='Commit' --Ryelugu 03/06/2015 - Every Event records a begin version and a commit version into Buffer ( XML ) we need the committed version
    AND p.q.value('(./data[@name="object_type"]/text)[1]','varchar(100)') <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND p.q.value('(./data[@name="object_name"]/value)[1]','varchar(100)') NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND p.q.value('(./action[@name="client_app_name"]/value)[1]','varchar(100)') <> 'Replication Monitor' --Ryelugu : 03/09/2015 We do not want any records being caprutred by Replication Monitor ??
    SELECT GETDATE() GETDATE_4
    -- SELECT * FROM #TEMP
    -- SELECT COUNT(*) FROM #TEMP
    -- SELECT GETDATE()
    -- RETURN
    -- PRINT '3'
    --RETURN
    INSERT INTO [dbo].[MN_DDLSchema_Changes_log]
    [UserName]
    ,[DbName]
    ,[ObjectName]
    ,[client_app_name]
    ,[ClientHostName]
    ,[ServerName]
    ,[SQL_TEXT]
    ,[EE_Time_Stamp]
    ,[Event_Name]
    SELECT
    CASE WHEN T.nt_username IS NULL OR LEN(T.nt_username) = 0 THEN t.ServerPrincipalName
    ELSE T.nt_username
    END
    ,T.DbName
    ,T.objectname
    ,T.clientappname
    ,t.ClientHostName
    ,T.server_instance_name
    ,T.sqltext
    ,T.Time_Stamp_EE
    ,T.eventname
    FROM
    #TEMP T
    /** -- RYelugu 03/06/2015 - Filters are now being applied directly while retrieving records from BUFFER or on XML
    -- Ryelugu 03/15/2015 - More filters are likely to be added on further testing
    WHERE ddl_Phase ='Commit'
    AND ObjectType <> 'STATISTICS' --Ryelugu 03/06/2015 - May be SQL Server Internally Creates Statistics for #Temp tables , we do not want Creation of STATISTICS Statement to be logged
    AND ObjectName NOT LIKE '%#%' -- Any stored proc which creates a temp table within it Extended Event does capture this creation statement SQL as well , we dont need it though
    AND T.Time_Stamp_EE >= @Prev_Insertion_time --Ryelugu 03/05/2015 - Performance Optimize
    AND NOT EXISTS ( SELECT 1 FROM [dbo].[MN_DDLSchema_Changes_log] MN
    WHERE MN.[ServerName] = T.server_instance_name -- Ryelugu Server Name needes to be added on to to xml ( Events in session )
    AND MN.[DbName] = T.DbName
    AND MN.[Event_Name] = T.EventName
    AND MN.[ObjectName]= T.ObjectName
    AND MN.[EE_Time_Stamp] = T.Time_Stamp_EE
    AND MN.[SQL_TEXT] =T.SqlText -- Ryelugu 03/05/2015 This is a comparision Metric as well , But needs to decide on
    -- Peformance Factor here , Will take advise from Lance if comparision on varchar(max) is a vital idea
    --SELECT GETDATE()
    --PRINT '4'
    --RETURN
    SELECT
    top 100
    [EE_Time_Stamp]
    ,[ServerName]
    ,[DbName]
    ,[Event_Name]
    ,[ObjectName]
    ,[UserName]
    ,[SQL_TEXT]
    ,[client_app_name]
    ,[Created_Date]
    ,[ClientHostName]
    FROM
    [dbo].[MN_DDLSchema_Changes_log]
    ORDER BY [EE_Time_Stamp] desc
    -- select getdate()
    -- ** DELETE EVENTS after logging into Physical table
    -- NEED TO Identify if this @XML can be updated into physical system table such that previously loaded events are left untoched
    -- SET @XML.modify('delete /event/class/.[@timestamp="2015-03-06T13:01:19.020Z"]')
    -- SELECT @XML
    SELECT GETDATE() GETDATE_5
    END
    GO
    Rajkumar Yelugu

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

  • Index as varchar or numeric

    Hi:
    I'm using a field that contains only digits (0..9) and will use this field as a primary key. Does it make any difference if the field is a varchar or a numeric? I do not plan on performing any mathematical operations on the field's value, so it would be easier to store & retrieve as a varchar. But is it quicker to assess a row based on a primary key which is numeric or varchar?
    Thanks.
    - Rolf.

    You would, potentially, have to call TO_CHAR on the number when you wrote it out, but I would tend to just rely on implicit conversion there. Depending on how you are reading the XML response, you can probably get a numeric value back without doing any conversion.
    I would have two primary functional considerations here
    1) Is this a key that any human will ever use? If you are generating an invoice number, for example, someone may want to look up that invoice using the invoice number even though invoice number doesn't have any business meaning. Do the users think of this string in numeric terms? Or as a string? For example, do the users see value 1 as the same as 000001? Or would they prefer to always enter the "right" number of characters.
    2) Data integrity- if non-numeric characters would be incorrect, the field should be a number. Otherwise, someone will end up writing alphabetical characters to the field.
    Both of these would tend toward using NUMBER columns, unless users were really attached to the idea that it isn't invoice #1, it is invoice "000000001".
    As secondary factors, numbers are more compact than strings, so performance is likely to be marginally better with numers rather than strings. By the same token, the table and index(es) are likely to cnosume less disk space when you use numbers. Performance here, though, should be a secondary consideration to functionality.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Query XML(CLOB) datatype

    Hello,
    I am new to XML and have been trying this for few days and get no luck ...
    First, I have an Excel file, which contains a list of bills for customers. It is a sample file to test my application.
    In the future, my application will receive data of XML-datatype, so my job here is to import this Excel file into my Oracle database 11gr2, then transform it to XML datatype one.
    I did import it by using Oracle SQL Developer and nicely stored it in a table called so_lieu.
    After that, I run the following code to convert the table data to XML datatype:
    CREATE TABLE xmlDoc(temp CLOB);
    DECLARE
      qryCtx DBMS_XMLGEN.ctxHandle;
      temp CLOB;
    BEGIN
      qryCtx := DBMS_XMLGEN.newContext('SELECT * FROM huy.so_lieu');
      -- Set the row header to be bill
      DBMS_XMLGEN.setRowTag(qryCtx, 'bill');
      -- Get the result
      temp := DBMS_XMLGEN.getXML(qryCtx);
      INSERT INTO xmlDoc VALUES(temp);
      --Close context
      DBMS_XMLGEN.closeContext(qryCtx);
    END;
    It is a success:
    table XMLDOC created.
    anonymous block completed
    When I run: SELECT * from xmlDoc; I can get a data of XML-datatype as following:
    <?xml version="1.0"?>
    <ROWSET>
    <bill>
      <MA_CQTT>5335</MA_CQTT>
      <ACCOUNT>P482668</ACCOUNT>
      <TEN_CQTT>Công ty TNHH FrieslandCampina Việt Nam</TEN_CQTT>
      <DIACHI>phường Bình Hòa, Thị xã Thuận An, Bình Dương</DIACHI>
      <MS_THUE>3700229344-   -</MS_THUE>
      <SDT>754422 ext 333</SDT>
      <LOAI_DV>48</LOAI_DV>
      <TEN>Mail - SMD</TEN>
      <CUOC_DV>0</CUOC_DV>
      <DC>0</DC>
      <CUOC_TBSD>0</CUOC_TBSD>
      <TRUY_THU>0</TRUY_THU>
      <TONG_TIEN>22254545</TONG_TIEN>
      <VAT>2225455</VAT>
    </bill>
    <bill>
      <MA_CQTT>90255</MA_CQTT>
      <ACCOUNT>P0421100</ACCOUNT>
      <TEN_CQTT>VPĐD HOME MERIDIAN INTERNATIONAL,INC TạI TP.HCM</TEN_CQTT>
      <DIACHI>Tầng trệt, Block C, Cao ốc An Khang, P. An Phú, Q.2, TP.HCM</DIACHI>
      <MS_THUE>0302199864-   -</MS_THUE>
      <SDT>838228511</SDT>
      <FAX>838293764</FAX>
      <LOAI_DV>7</LOAI_DV>
      <TEN>Internet trực tiếp</TEN>
      <CUOC_DV>0</CUOC_DV>
      <DC>0</DC>
      <CUOC_TBSD>35446000</CUOC_TBSD>
      <TRUY_THU>0</TRUY_THU>
      <TONG_TIEN>35446000</TONG_TIEN>
      <VAT>3544600</VAT>
    </bill>
    </ROWSET>
    Then I try to select/query the XML elements inside that XML data (to parse them into another tables) but cannot. I tried:
    SELECT XMLQuery('
        for $x in ora:view("xmlDoc")/ROW
           return $x/TEMP/ROWSET/bill/MA_CQTT
    ' RETURNING CONTENT) FROM DUAL;
    It gave errors
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (ROWSET)
    19276. 00000 -  "XP0005 - XPath step specifies an invalid element/attribute name: (%s)"
    *Cause:    The XPath step specified invalid element or attribute name that did not match any nodes according to the input XML schema or structure.
    *Action:   Correct the element or attribute name as the name may be mis-spelled.
    I read several threads and think that maybe my ROWSET element is not XML anymore. Thus, cannot select using XPath. How can I fix it?
    Thank you in advance,
    Huy Do.
    PS: I tried using XMLTABLE as below:
    SELECT x2.*
      from XMLDOC h,
        XMLTABLE(
          '//ROWSET/bill'
          PASSING xmltype(h.temp)
          COLUMNS ma_cqtt  varchar(20) path 'ma_cqtt'
          ) x2
    The query gave me a table of 2566 row of "ma_cqtt" but their value are all "null" (excel file has 2566 rows of record)
    Message was edited by: 2716502

    Thank you Odie I tried:
    INSERT INTO DM_TABLE (ma_cqtt, account, thang_ps)
        select x.ma_cqtt
             , x.account
             , thangps as thang
    Of course it returned an error, how silly of me to complicate thing like that
    And I have one more question about the speed to parse a xml data. Please, help me with it.
    In my code, I usually store xml data as a row in a temporary table (table mau_so_lieu). Then when doing parsing, I call the xml data from that table and the processing time is usually ~0.5s only. The code is like below:
    INSERT INTO mau_so_lieu VALUES(xmlData);
    INSERT INTO DM (                         
                                ma_kh, account, thang_ps)
        select x.ma_kh, x.account, thang
          from mau_so_lieu m, xmltable
              ('//Bao_cuoc'
                passing m.BILL
                columns
                   ma_kh varchar2(20) path '@ma_cqtt'
                  , account varchar2(20) path '@account'
              ) x;
    But one of my senior (SQL server expert) suggested to store xml data in a variable (xmlData XMLType) as he thought the processing time will be even shorter, as well as no temporary table needed (no trash left which need to be cleaned later). I tried that but somehow the processing time is > 5s with the code as below:
    INSERT INTO DM (                         
                                ma_kh, account, thang_ps)
        select x.ma_kh, x.account, thang
          from xmltable
              ('//Bao_cuoc'
                passing xmlData
                columns
                   ma_kh varchar2(20) path '@ma_cqtt'
                  , account varchar2(20) path '@account'
              ) x;
    Could you tell me why the processing time are so different? Is it because of the default RAM of Oracle XE 11g is too small to process?
    Thank you very much,
    Huy Do.

  • 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

Maybe you are looking for

  • Help my safari doesnt open and gives me a crash report

    help my safari doesn't open and gives me a crash report ever since i downloaded a file from the internet. I have a macbook air (early 2014) with running os x yosemite version 10.10.1

  • Help needed in Query

    I have one table Prd_mst, I need a query or function where whenever i pass the child_id into query or function i get the Parent_id of that example Data is below :- P_ID,P_NAME,C_ID null,Computer,1 1,KeyBoard,2 1,Mouse,3 1,Mother Board,4 3,Scroll Mous

  • Can no longer open existing pdf files

    My adobe free reader program has recently become very slow and fairly non-responsive lately.  I use PDFCreator Plus for printing.  When I attempted to print a PDF to the PDFCreator Plus today (as I've done for years) when the reader was opening files

  • How to use the method "getChildrenRemoved()" declared in ElementChange?

    How to use the method "getChildrenRemoved()" declared in DocumentEvent.ElementChange?

  • External Display with Lid Down?

    I'm figuring out how to get an external display connected to my MacBook So far, so good. I'm sitting at a big 20" wide-screen display as I type this. Now, I want to be able to close the lid on the MacBook when I'm working on this big display... But,