Parse the JSON using PL/SQL string

I created a script that reads data from the Mobile App DB (which is based on MongoDB) of Oracle SQL Developer. The result is the string JSON stored in l_response_text VARCHAR2 (32767);

The string has the format such as:


[{"Postcode":"47100","OutletCode":"128039251","MobileNumber":"0123071303","_createdAt":"2014-11-10 06:12:49.837","_updatedAt":"2014-11-10 06:12:49.837"}, {"Postcode":"32100","OutletCode":"118034251", ..... ]




However, I need to analyze this l_response_text such that each table will in his column in a table called appery_test. appery_test table has the same number of columns pairs JSON and in the same order (e.g. name of the first column is 'postal Code')

I searched and I found most of the results on the analysis of the Oracle in JSON table and not the other way around. I found, however, that link which is somewhat similar to my problem. However, the library suggested in the answer doesn't have an example on how to use it to insert JSON into conventional table using PL/SQL.

N.B.: I use g 11 and not 12 c. If the functions built by are not available for me.

Thank you very much

Sorry, I am a novice in this area too.

However, it worked for me:

declare

l_list json_list;

l_data CLOB;

Code postal clob;

l_val json_value;

Start

-json data recovery

Select the data in l_data from jsons where id = 1;

l_list: = json_list (l_data);

I'm looping 1.l_list.count

l_val: = json_ext.get_json_value (json (l_list.get (i)), 'Postcode');

DBMS_LOB.CREATETEMPORARY (zip, true, 2);

json_value.get_string (l_val, postal code);

-Put some things

dbms_output.put_line (DBMS_LOB. GetLength (Postcode));

dbms_output.put_line (dbms_lob.substr (postal code, 20, 1));

DBMS_LOB.freeTemporary (Postcode);

end loop;

end;

47328

9J / / 4AAQSkZJRgABAQAA

Added dbms_lob.freetemporary (postcode);

Tags: Database

Similar Questions

  • How to call the package from a SQL string function

    I create a SQL string in my c# application. Within the selection, I have a function call to a package in my diagram.

    ex.

    "Select id, package1.fncFormat (text) of tblText".

    If I run this within Oracle it works fine but when I run my application and the SQL runs the use of OracleDataReader I get


    «ORA-00904: "PACKAGE1".» ' FNCFORMAT': invalid identifier.

    Is this possible to do?

    It is a dynamic sql string that is built using many different options.

    Thanks for any help

    Do you run this application and directly on DB package by the same user?
    Check the privileges of the user on the application.

    Kind regards
    Bobin

  • Need examples of code to parse the xml using kxml2

    Hello world

    I am a beginner for Blackberry, I want to get the data from the xml file. I look and see the section use of kxml2 is a better choice.

    But I can't find an example code for it on the Blackberry.  Can someone share me?

    I open kxml2.jar, I see xmlParser and kxmlParser, whoever I'm use()?

    Anbody can help me contact how to use kxml2 clearly?

    Thank you very much. Sorry for the bad English.

    --------

    Binh - VietNam

    Ah yes, sorry, I assumed automatically kxml to be used with ksoap2.

    kxml is a j2me parser commonly you can find sources in other forums, for example
    http://www.developer.Nokia.com/community/wiki/How_to_parse_an_XML_file_in_Java_ME_with_kXML
    http://j2mesamples.blogspot.com/2009/04/XML-parsing-in-J2ME.html

  • Parses the JSON response in blackberry

    Hi, I want to analyze the response from the server in JSON format.

    I did some searching on Google but I can not find any library or jar kind of thing. Everywhere, it is supplied code open source in the zip file.

    How can I achieve this?... & If there is no available for blackberry and then how to use any container that opens the source code in my application?

    I used 1 jar file org.json, but it gives me the "module not found" exception

    Help, please...

    Thanks in advance.

    Download the zip package org.json.me file and import it into your project...

    can use it as...

    External JSONObject = new JSONObject (resp);     an RESP is JSON response I get
    JSONArray ja = outer.getJSONArray ('DATA');
    JSONArray arr = ja.getJSONArray (0);                to access each element in the JSON array.

    If the response contains the JSON array... A JSON array will be of the form...

    'DATA': ['abc', 'def'] / / DATA isarray and 'abc' and 'def' name are elements of the table...

  • OutOfMemoryError: Limit superior GC exceeded when loading directly the source using IKM sql for sql. Growing ODI_MAX_HEAP do not solve the problem.

    OutOfMemoryError: GC overhead limit at execution a loading interface directly sql for sql with no work table.

    I get the error message: error: exception OutOfMemoryError: higher GC limit exceeded when executing an interface making a direct using IKM SQL for SQL command load Append, source a 150millions lines table.

    I have increased the ODI_MAX_HEAP and the interface run longer and failed. I'm already at: ODI_MAX_HEAP = 12560 m I tested with ODI_MAX_HEAP = 52560 m and still error.

    I am following up to the memory of the server and I still have available memory...

    Apart from the problem of memory I know that this type of load should be possible because the step of data load on LKM SQL to Oracle is able to load the work table $ CAN. Ideally, I want to emulate this behavior by using SQL for SQL IKM.

    1 - What is the right path to follow here? (change the parameters of memory or modify the IKM?)


    2 - ideas on how to solve the OutOfMemoryError: GC overhead limit exceeded error? (GC means Garbage Collector)

    Execution of the IKM interface in the Simulator generates this code:

    Load (Source) command:

    Select

    source - tbl.col1 COL1,

    source - tbl.col2 COL2,

    source-tbl. "' COL3 ' COL3

    of public.source - tbl AS source-tbl

    where

    (1 = 1)

    Default command (Destination):

    insert into the source-tbl

    (

    col1,

    col2,

    COL3

    )

    values

    (

    : COL1,.

    : COL2.

    : COL3

    )

    My experience is very limited with ODI so I don't know about changing the code to the KMs

    Thanks in advance.

    Find a work around the error of generals limit exceeded GC:

    -in my case I was running without the IDE so that changes made to the odiparams.sh were not useful.

    -This means that I need to change the JVM settings to:

    $ODI_HOME/oracledi/client/odi/bin/odi.conf

    AddVMOption - XX: MaxPermSize = NNNNM

    $$ODI_HOME/oracledi/client/ide/bin/ide.conf

    AddVMOption - XmxNNNNM

    AddVMOption - XmsNNNNM

    Where NNNN is a higher value.

  • Apex - disable the button using PL/SQL code

    Hi all

    I use a PL/SQL code to get a DB value, depending on the value that I need to disable the buttons on the Page.

    I tried code below

    IF : P2_FLAG == ' not THEN

    HTP.script ("document.getElementById ("SUBMIT") .disabled = false;", "Javascript");

    END IF;

    It is said screw the page saying - the/apex/f requested URL was not found on this server

    I use Apex 5.0, please need your contributions.

    Hello

    However, if you want to show/hide the button, you can use conditions:

    Open the properties of the button and put Conditions such as "Item = value '.

    Point - P2_FLAG

    Value - N

    To turn on or off, you must run ajax with jquery to get the DB value before charge and then print button.

    It may be useful

    Sunil Bhatia

  • create the cookie using pl sql and retrieve values

    Hello
    I am currently in an urgent need to create cookies to BE oracle and also read the values of the. I tried to use code below. his display error
    code
    DECLARE
    ourcookie owa_cookie.cookie;
    BEGIN
    ourCookie: = owa_cookie.get('SESSION2');
    END;
    /

    BEGIN

    owa_util.mime_header ("text/html", FALSE ");

    -Create a cookie
    (owa_cookie). Send
    name = > 'SESSION. "
    value = > '344444',.
    expires = > sysdate + 2,.
    path = > ' / ');


    owa_util.http_header_close;

    EXCEPTION
    WHEN OTHER THEN NULL;

    END;


    But when I'm reading the cookie that I created, I am unable to exercise

    -It's for reading cookies
    DECLARE
    ourcookie owa_cookie.cookie;
    BEGIN
    ourCookie: = owa_cookie.get('SESSION2');
    END;
    /

    error:
    ORA-06502: PL/SQL: digital error or value
    ORA-06512: at "SYS." OWA_UTIL", line 325
    ORA-06512: at "SYS." OWA_COOKIE', line 36
    ORA-06512: at "SYS." OWA_COOKIE', line 140
    ORA-06512: at line 4 level

    842106 wrote:

    Now according to the guidelines of your comment, I created a simple OWA environment and run the code below. Now I get not found error of data

    ORA-01403: no data found
    ORA-06512: at line 23

    The error is caused the cookie is not found.

    The following is not valid - as there is no browser to receive the cookie:

    (owa_cookie). Send
    name-online "SESSION1"
    value-online '344433',
    expires => it sysdate + 2,.
    => path ' / '.
    );

    The following code must set the CGI environment - and add the cookie to the environment for the following code to read (as shown in the code example that I posted in the 2nd thread I talked to you):

    / * Initialization * /.
    OWA.cgi_var_name (1): = 'something ';
    OWA.cgi_var_val (1): = "other";
    OWA.init_cgi_env (1, owa.cgi_var_name, owa.cgi_var_val);
    / * End initialization * /.

    Of course, the following code will fail with a NO_DATA_FOUND there is no cookie.

    ourCookie: = owa_cookie.get('SESSION1');
    v_session: = ourCookie.vals (1);

    So it is not possible to create a true cookie and retrieve the value of CGI environment or apex not?

    Yes. But the web browser is non-existent. Then, you need create the CGI environment, which would have created the web server, before you call your allowed web code PL/SQL.

    In other words, if your initialization code of CGI should pretend that it is the web server, he received the call from web browser, it received the cookie (s) from the web browser - and now she needs to create the CGI (including cookies) environment for this web browser, and then call the procedure PL/SQL referenced by the browser in the URL, he argued.

  • How can we make the Partition on the result using only sql?

    Hello

    How to make the partition on sql result using the query.

    sample
    BPREF_NO     BILL_MONTt AVG_IND     partition
    Q12345     1/31/2009     2     part1
    Q12345     2/28/2009     2     part1
    Q12345     3/31/2009     2     part1
    Q12345     4/30/2009     2     part1
    Q12345     5/31/2009     2     part1
    Q12345     6/30/2009     1     part1
    Q12345     7/31/2009     2     part1
    Q12345     9/30/2009     1     part2
    Q12345     10/31/2009     2     part2
    Q12345     11/30/2009     2     part2
    Q12345     1/31/2010     1     part3
    Q12345     2/28/2010     2     part3
    Q12345     3/31/2010     2     part3
    Q12345     11/30/2011     2     part4
    Q12345     2/29/2012     2     part5
    Q12345     3/31/2012     2     part5
    Q12345     4/30/2012     2     part5
    Q12345     5/31/2012     2     part5
    Q12345     7/31/2012     2     part6
    I want to create the partition column using the query
    from the logic below

    If bill_month is the sequence then it must create a partition and if the breaks we need to introduce the new partition.

    just for example...
    January 31, 2009 to July 31, 2009 is called part1
    August 30, 2009 to November 30, 2009 called part2
    like wise...

    is it possible to make the partition of the query itself.

    Please guide me in this regard

    Thanks in advance

    Iqbal
    with testdata as (
    select 'Q12345' BPREF_NO, to_date('1/31/2009','MM/DD/YYYY') BILL_MONTt,2 AVG_IND from dual union all
    select 'Q12345', to_date('2/28/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('3/31/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('4/30/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('5/31/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('6/30/2009','MM/DD/YYYY'),1 from dual union all
    select 'Q12345', to_date('7/31/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('9/30/2009','MM/DD/YYYY'),1 from dual union all
    select 'Q12345', to_date('10/31/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('11/30/2009','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('1/31/2010','MM/DD/YYYY'),1 from dual union all
    select 'Q12345', to_date('2/28/2010','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('3/31/2010','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('11/30/2011','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('2/29/2012','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('3/31/2012','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('4/30/2012','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('5/31/2012','MM/DD/YYYY'),2 from dual union all
    select 'Q12345', to_date('7/31/2012','MM/DD/YYYY'),2 from dual
    )
    
    select
      BPREF_NO
    , AVG_IND
    , BILL_MONTt
    , 'part'||
      sum (partition) over (partition by BPREF_NO order by BILL_MONTt)
      partition
    from (
    select
      BPREF_NO
    , AVG_IND
    , BILL_MONTt
    , case
      when months_between (BILL_MONTt, lag(BILL_MONTt) over (partition by BPREF_NO order by BILL_MONTt)) = 1 then
      0 else 1 end partition
    from testdata
    )
    
    BPREF_NO AVG_IND BILL_MONTT PARTITION
    Q12345 2 01/31/2009 part1
    Q12345 2 02/28/2009 part1
    Q12345 2 03/31/2009 part1
    Q12345 2 04/30/2009 part1
    Q12345 2 05/31/2009 part1
    Q12345 1 06/30/2009 part1
    Q12345 2 07/31/2009 part1
    Q12345 1 09/30/2009 part2
    Q12345 2 10/31/2009 part2
    Q12345 2 11/30/2009 part2
    Q12345 1 01/31/2010 part3
    Q12345 2 02/28/2010 part3
    Q12345 2 03/31/2010 part3
    Q12345 2 11/30/2011 part4
    Q12345 2 02/29/2012 part5
    Q12345 2 03/31/2012 part5
    Q12345 2 04/30/2012 part5
    Q12345 2 05/31/2012 part5
    Q12345 2 07/31/2012 part6 
    
  • In the instructions using 1 SQL = 1

    I just said our DBA that we have to go through our code and remove the 'WHERE 1 = 1' in our SQL statements on a SQL 2000 database. He says it's a performance issue when nothing else will succeed him (no AND).

    For example (the wrong way):
    SELECT this_ID FROM thistable WHERE 1 = 1

    Compared to...
    SELECT this_ID FROM thistable WHERE 1 = 1 AND this_ID = 1001

    Microsoft has said that it is causing a performance hit when there is no clauses from the place WHERE, said.

    Some of these SQL statements are big enough and there is no practical way to make a CFIF beforehand.

    Everyone knows a performance hit like that? If so, how much of a sudden? The main table in the DB has about 2 million documents with full-text indexes.

    Thank you
    Rob in Tampa



    Tell him to make his g * use of the dam and set up the database as a real dba should
    and even if harping on things that affect performance as much as you
    Blow up near the server.

    "TPA_Dude" wrote in message
    News:e6khe4$S0A$1@forums. Macromedia.com...
    > MikerRoo.
    > Thank you for your quick response. I enabled for debugging
    > my
    > IP, so I'll start to write execution time for individual applications.
    > I
    > didn't know I could see the plan, so thank you. I don't know who will help you
    > much.
    >
    > Thanks again to everyone.
    > Rob
    >

  • Skip a page and print on the back using PL/SQL?

    Morning people,
    Greetings from Toronto. I have a report that was written in PL/SQL (not Oracle or SQL reports * most) and its job very well. The totals are correct and I have two sets of totals. A total for the Department in particular and, finally, a total of the entire company. The user of course wish the two totals for each same Department if he or she chooses to print only service (using a setting). So, it's not a problem.

    I just want to be the total final (company-wide) on the last page. Now, it is relatively simple in the reports of the Oracle, as well as SQL * more reports where I could probably use Skip. Y at - it a simple way to do or what I must count lines based on pagesize? So, for example, if the size of my page is 53 and my last record Department stops at line 35, I have to insert empty rows using UTF_FILE. Put_line in a FOR loop. This method would probably work ut I wonder if there's ways more interesting or easier to do?

    This issue does not have to decide at this moment and I know its Monday. :-) Any help would be appreciated.

    Concerning
    REDA

    Published by: Raj404261 on June 8, 2009 10:22

    Try:

        -- etc --
        UTL_FILE.FFLUSH (id);
        UTL_FILE.PUT_LINE(id,CHR(12));
        -- Write totals:
        -- etc --
    

    : p

  • building XPath with the XML with the Namespace using PL SQL

    All trying to build the path to each node, when the XML code with no namespace, the following code works very well provide the result

    1 ~/

    2 ~ /Person/

    3 ~ /Person/ âge /

    4 ~ /Person/ homecity /

    5 ~ /Person/ nom /

    6 ~ /Person/ AccueilGuides/lat /

    7 ~ /Person/ AccueilGuides/name /

    8 ~ /Person/ homecity / long /

    But when the XML is changed to

    <person xmlns="urn:person" xmlns:lat="urn:lat">
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>"

    The result of the code below the performance translates into just below result

    1~/
     2~/person/

    In the XML file above, XML namespace is not constant and varies for each XML. My requirement is to analyze the complete XML code, where I can read the XML with namespace and get the result that is mentioned below

    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat:lat/
    7~/person/homecity/name/
    8~/person/homecity/long/

    Can you please help me solve the issue mentioned. Thanks in advance. -Code snippet below:

    DECLARE
      l_File VARCHAR2(32000) := '<person>
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>';
     
     l_Where_Clause VARCHAR2(100) := '/*';
     l_Append_Var   VARCHAR2(100) := '/';
     
     TYPE Ty_Paths IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER;
     l_Ty_Paths      Ty_Paths;
     l_Ty_Paths_Temp Ty_Paths;
     
     TYPE Ty_Verifier IS TABLE OF VARCHAR2(1000) INDEX BY VARCHAR2(1000);
     l_Ty_Varifier Ty_Verifier;
     
    l_Prev_Query_Rec VARCHAR2(100);
    l_Index_Num      NUMBER := 0;
    l_Cur_Exec_Row   NUMBER := 0;
    BEGIN
     l_Ty_Paths(Nvl(l_Ty_Paths.COUNT, 0) + 1) := l_Append_Var;
     l_Cur_Exec_Row := 1;
     
     --Dbms_Output.put_line('Before entering the loop');
     
     LOOP
       l_Ty_Paths_Temp.DELETE;
      SELECT DISTINCT REPLACE(l_Append_Var || '/' || t.Xml || '/', '//', '/') BULK COLLECT
       INTO   l_Ty_Paths_Temp
      FROM   (SELECT Xmltype(Extract(VALUE(e), '/').Getstringval()) .Getrootelement() AS Xml
               FROM   TABLE(Xmlsequence(Extract(Xmltype(l_File), l_Where_Clause))) e) t;
     
      l_Ty_Varifier(Nvl(l_Ty_Varifier.COUNT, 0) + 1) := l_Append_Var;
      --Dbms_Output.put_line('L_TY_PATHS_TEMP.Count::'||L_TY_PATHS_TEMP.Count);
      IF l_Ty_Paths_Temp.COUNT > 0 THEN
         l_Index_Num := Nvl(l_Ty_Paths.COUNT, 0) + 1;
         FOR i IN l_Ty_Paths_Temp.FIRST .. l_Ty_Paths_Temp.LAST LOOP
            l_Ty_Paths(l_Index_Num) := l_Ty_Paths_Temp(i);
            --Dbms_Output.put_line('L_INDEX_NUM::'||L_INDEX_NUM);
            --Dbms_Output.put_line('L_TY_PATHS(L_INDEX_NUM)::'||L_TY_PATHS(L_INDEX_NUM));
            l_Index_Num := l_Index_Num + 1;
         END LOOP;
      END IF;
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_TY_PATHS.Count);
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_CUR_EXEC_ROW);
     
      IF (NOT l_Ty_Paths.EXISTS(l_Cur_Exec_Row + 1)) OR (l_Cur_Exec_Row = l_Ty_Paths.COUNT) THEN
         --Dbms_Output.put_line('Exiting');
         EXIT;
      ELSE
         --Dbms_Output.put_line('Inside the Else part');
     
         l_Cur_Exec_Row := l_Cur_Exec_Row + 1;
         l_Append_Var   := l_Ty_Paths(l_Cur_Exec_Row);
         l_Where_Clause := l_Ty_Paths(l_Cur_Exec_Row) || '*';
      END IF;
     
      --To Display the record:
         --Dbms_Output.put_line(L_TY_PATHS.Count);
      END LOOP;
      IF l_Ty_Paths.COUNT > 0 THEN
        FOR i IN l_Ty_Paths.FIRST .. l_Ty_Paths.LAST LOOP
          Dbms_Output.Put_Line(i || ' record is ' || l_Ty_Paths(i));
       END LOOP;
     END IF;
     
    END;

    Thank you.

    If you have patterns, it may be easier to work directly on them.

    Here's the idea:

    (1) install "Oracle XML DB manageability Packages", available on the code page for the XML DB sample: http://download.oracle.com/otn/samplecode/xdb_util.zip

    This is a set of utilities which allows us to annotate the XML schemas, to deal with the underlying or storage structure, and (this is the interesting part here) a few views of dictionary to describe the relational XSD structure.

    (it is now an integrated 12 c btw)

    (2) enter these two schemas:

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "pacs.002.001.03S2.xsd."

    schemaDoc-online xmltype (bfilename('TEST_DIR','pacs.002.001.03S2.xsd'), nls_charset_id ('AL32UTF8'))

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "SCTCvfBlkCredTrf.xsd."

    schemaDoc-online xmltype (bfilename('TEST_DIR','SCTCvfBlkCredTrf.xsd'), nls_charset_id ('AL32UTF8'))

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    (3) the following query built all the paths of node defined by the main schema (SCTCvfBlkCredTrf.xsd), as well as the namespaces:

    with schema_list (schema_url, schema_owner) as)

    Select 'SCTCvfBlkCredTrf.xsd', 'OTN' from dual

    Union of all the

    Select sd.dep_schema_url, sd.dep_schema_owner

    of schema_list sl

    Join dba_xml_schema_dependency on sd.schema_url = sl.schema_url sd

    and sd.schema_owner = sl.schema_owner

    ),

    namespace_mapping (target_namespace, prefix) as long as)

    Select target_namespace

    , « ns » || ROW_NUMBER() (order target_namespace) as a prefix

    of user_xml_schema_namespaces

    where schema_url in (select schema_url from schema_list)

    ),

    () schema_nodes

    is_attr

    node_name

    max_occurs

    element_id

    parent_element_id

    target_namespace

    schema_url

    ) as)

    Select 0

    element_name as node_name

    xmlcast)

    XMLQUERY ('/ XS: ELEMENT / ' @maxOccurs passing returning content element)

    as varchar2 (10)

    )

    element_id

    parent_element_id

    target_namespace

    schema_url

    of user_xml_schema_elements

    where schema_url in (select schema_url from schema_list)

    Union of all the

    Select 1

    attribute_name as node_name

    null

    null

    element_id

    target_namespace

    schema_url

    of user_xml_schema_attributes

    where schema_url in (select schema_url from schema_list)

    )

    Select the level

    sn.node_name

    sn.max_occurs

    connect_by_isleaf as is_leaf

    sys_connect_by_path)

    -case when ns.prefix is not null and is_attr = 0 then ns.prefix | ':' end |

    -case when sn.is_attr = 1 then ' @' end |

    SN. NODE_NAME

    , '/'

    ) as xpath

    -, target_namespace

    of schema_nodes sn

    outer join ns namespace_mapping let ns.target_namespace = sn.target_namespace

    Connect prior sn.element_id = sn.parent_element_id

    Start with sn.schema_url = "SCTCvfBlkCredTrf.xsd".

    and sn.parent_element_id is null

    ;

    LEVEL MAX_OCCURS IS_LEAF XPATH NODE_NAME
    ----- ------------------ ---------- ------- ----------------------------------------------------------------------------------------------------------
    1 SCTCvfBlkCredTrf 0 /ns2:SCTCvfBlkCredTrf
    2 1 SndgInst /ns2:SCTCvfBlkCredTrf / ns2:SndgInst
    2 1 RcvgInst /ns2:SCTCvfBlkCredTrf / ns2:RcvgInst
    2 1 SrvcId /ns2:SCTCvfBlkCredTrf / ns2:SrvcId
    2 1 TstCode /ns2:SCTCvfBlkCredTrf / ns2:TstCode
    2 FType 1 /ns2:SCTCvfBlkCredTrf / ns2:FType
    2 FileRef 1 /ns2:SCTCvfBlkCredTrf / ns2:FileRef
    2 1 FileDtTm /ns2:SCTCvfBlkCredTrf / ns2:FileDtTm
    2 1 OrigFRef /ns2:SCTCvfBlkCredTrf / ns2:OrigFRef
    2 1 OrigFName /ns2:SCTCvfBlkCredTrf / ns2:OrigFName
    2 1 OrigDtTm /ns2:SCTCvfBlkCredTrf / ns2:OrigDtTm
    2 1 FileRjctRsn /ns2:SCTCvfBlkCredTrf / ns2:FileRjctRsn
    2 1 FileBusDt /ns2:SCTCvfBlkCredTrf / ns2:FileBusDt
    2 1 FileCycleNo /ns2:SCTCvfBlkCredTrf / ns2:FileCycleNo
    2 FIToFIPmtStsRptS2 1 /ns2:SCTCvfBlkCredTrf 0 / ns2:FIToFIPmtStsRptS2
    3 GrpHdr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr
    4 MsgId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:MsgId
    4 CreDtTm 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:CreDtTm
    4 InstgAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt
    5 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt / ns1:FinInstnId
    6 BIC 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:GrpHdr / ns1:InstgAgt / ns1:FinInstnId / ns1:BIC
    3 OrgnlGrpInfAndSts 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts
    4 OrgnlMsgId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlMsgId
    4 OrgnlMsgNmId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlMsgNmId
    4 OrgnlNbOfTxs 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlNbOfTxs
    4 OrgnlCtrlSum 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:OrgnlCtrlSum
    4 GrpSts 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:GrpSts
    4 StsRsnInf 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf
    5 Orgtr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr
    6 id 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id
    7 OrgId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId
    8 1 BICOrBEI /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId / ns1:BICOrBEI
    5 ARS 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn
    6 Cd 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Cd
    6 Prtry 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Prtry
    4 NbOfTxsPerSts 2 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts
    5 1 DtldNbOfTxs /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldNbOfTxs
    5 1 DtldSts /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldSts
    5 1 DtldCtrlSum /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:OrgnlGrpInfAndSts / ns1:NbOfTxsPerSts / ns1:DtldCtrlSum
    3 TxInfAndSts boundless 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts
    4 StsId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsId
    4 OrgnlInstrId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlInstrId
    4 OrgnlEndToEndId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlEndToEndId
    4 OrgnlTxId 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxId
    4 TxSts 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:TxSts
    4 StsRsnInf 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf
    5 Orgtr 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr
    6 id 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id
    7 OrgId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId
    8 1 BICOrBEI /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Orgtr / ns1:Id / ns1:OrgId / ns1:BICOrBEI
    5 ARS 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn
    6 Cd 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Cd
    6 Prtry 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:StsRsnInf / ns1:Rsn / ns1:Prtry
    4 InstdAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt
    5 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt / ns1:FinInstnId
    6 BIC 1 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:InstdAgt / ns1:FinInstnId / ns1:BIC
    4 OrgnlTxRef 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef
    5 IntrBkSttlmAmt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:IntrBkSttlmAmt
    CTL 6 1 /ns2:SCTCvfBlkCredTrf/ns2:FIToFIPmtStsRptS2/ns1:TxInfAndSts/ns1:OrgnlTxRef/ns1:IntrBkSttlmAmt/@Ccy
    5 1 IntrBkSttlmDt /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:IntrBkSttlmDt
    5 DbtrAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt
    6 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt / ns1:FinInstnId
    7 1 BIC /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:DbtrAgt / ns1:FinInstnId / ns1:BIC
    5 CdtrAgt 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt
    6 FinInstnId 0 /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt / ns1:FinInstnId
    7 1 BIC /ns2:SCTCvfBlkCredTrf / ns2:FIToFIPmtStsRptS2 / ns1:TxInfAndSts / ns1:OrgnlTxRef / ns1:CdtrAgt / ns1:FinInstnId / ns1:BIC

    In fact, you would be generally extracted from mapping data in a separate query so that you can use it to build the dynamic with XMLNamespaces clause of the namespace.

    NB1: Also note that not all roads are needed, only those which IS_LEAF = 1 or MAX_OCCURS = "unlimited" or MAX_OCCURS > '1', then you can add a filter predicate in the query directly.

    NB2: The query does support all the features of XSD, for example, I've relied on the default behavior for attributes 'element_form_default' and 'attribute_form_default '.

  • Mail send the program using PL SQL

    Hi all

    I wrote a PL SQL to send emails of concurrent with attachment.

    Here, it has separate Application server and database server.
    I am able to send a file from the database server (Ex: .trc files).

    But I need to send application server .out files.

    When I run of concurrent all files in the application server only recovers.
    Please help me solve the problem.

    Operating system: HP 64 bit
    RDBMS: 10.2.0.4.0
    Oracle Applications: 11.5.10.2


    Please advice.

    Thanks in advance,
    Roselyne

    Hi Flo,
    I checked your Quary. Better, you can create a common shared drive .it will help.

    for your reference, please visit http://thalaimuthu.com

    Thank you
    Muthu

  • drop and re-create the table using dynamic sql

    The following procedure should drop the table and re-create it. Currently, I get the dbms_output of the query. If I run the query only, it works well. but through the procedure, it does not work. Please help me

    PROCEdure emp_backup is
    sql_txt varchar2(10000);
    begin
         begin
         EXECUTE IMMEDIATE 'drop table emp_backup ' ;
         exception
         when others then
         null;
    
         sql_txt:= 'CREATE TABLE emp_backup as ' ||
                     'select * from emp  '||
                     'where dep_no=10 ' ;
         dbms_output.put_line(sql_txt);
         EXECUTE IMMEDIATE sql_txt;
    Exception
    when others then
    Null;
    
    End;

    Daniel wrote:
    I'm getting following error ORA-01031: insufficient privileges

    What is the command to grant privileges to this

    GRANT CREATE TABLE TO <>
    

    Detaching Frank, however, and echoing my previous comment, let them down and to re-create the tables makes no sense. It is logical to truncate a table if you test a load. If you build a data warehouse, it makes sense to delete and re-create a partition if you rerun a load for a particular date and that you have daily partitions. Deletion and recreation of a table in a stored procedure is not a reasonable way to test a system (nor is there a reasonable way to approach change control issues that will inevitably produce when you need to change the structure of a table).

    Justin

  • Displays the dates of diff using PL/SQL expression for the item "display only"?

    Hello
    I have a single display element -: P2_FROM_Date. If his game, Fri, sat or Sun I want to put the date of the last Monday date. If its Mon, Mar or sea, it must be this date of Monday.

    Ex: Today is Friday and last Monday was 18.
    So yesterday, today, tomorrow and Sunday, the date appear as June 18, 2012.
    Since Monday to Wednesday, the date has to be the next that is Monday, June 24, 2012

    I tried under 'Source' from the element using PL/SQL expression and the body of the PL/SQL function. Does not

    Can anyone help?

    Thanks and greetings
    Umer

    1. you must set 'used source' "Always".
    2 If you use a PLSQL function as source type body should set a 'RETURN' statement like this:

    declare
    lv_date number;
    begin
    select to_char(sysdate,'D') into lv_date from dual;
    if lv_date=2 then
      return to_char(sysdate-1);
    end if;
    end;
    

    Published by: mario1977 on June 27, 2012 11:44

  • Why get ORA-00942 during the validation of PL/SQL cursor

    The database is 10 gr 2.

    ST_PKG_UTILITIES contains a procedure called "p_insert_update_person_info".

    The procedure includes a cursor that selects a view 'CDS_CIS_ETHNICITY '.

    I am logged in as the owner of the schema of the package. The view lies in another schema, but I have the right to SELECT on the view.

    When I try to compile the package, I get "ORA-00942: table or view does not exist", pointing to the CDS_CIS_ETHNICITY view.

    However, if I SELECT directly from the view using a SQL window, it returns information without problem.

    Code view is a SELECT statement on a table across a db_link. However, given that I can select directly from the view, I am not clear why I would get the error because the view is selected, within PL/SQL.

    Note that the table was originally, on the same server that the schema that I am now, so no db_link was necessary. When the schema of the table has been moved to a new server, we added the db_link. However, the package was never changed, we were careful to reproduce the names of objects that are used by the package, when building the db_link.

    Ideas on this issue would be appreciated.

    Thank you
    VP

    Published by: user618800 on December 9, 2008 14:53

    Hello

    Grant privileges directly to the owner of the whole.

    Looks like the privileges that you have about this point of view have been granted to a role, and the owner of the package has this role.
    Roles do not count inside stored procedures. You must have privileges granted directly to the owner (or to the PUBLIC, which probably does not apply in this case).

Maybe you are looking for

  • How to do the "oldest first" sort works?

    Some time ago I was on a snorkeling trip. I took some pictures on the beach with an iPhone 5s. And I took a few pictures under water with a camera rented in a plastic case (Panasonic DMC FT2). I create albums by events, to sort my photos. Not memorie

  • Untrusted connection for all sites

    I'm getting "this connection is Untrusted" for each external site/link outside my msn home page. I copied the text of the troubleshooting of a word doc page, but I can't send it because I can't have my office e-mail! What I'm doing!

  • IPad2 disabled and cannot connect to iTunes to restore

    IPad2 disabled and cannot connect to iTunes to restore

  • Qosmio G40 - update graphics card

    Hello world I know it works has already answered in October 2009, but I have a few not 100% course info on the upgrade of the graphics cards. Now I have a qosmio g40-10 with nvidia geforce 8600 with 512 video memory. Because this card is purely not e

  • Dolby Advanced Audio

    Hello On my HP G6-2244sa I opened the Dolby Advanced Audio in the control panel I want to open it. I don't know what any help would be apprecieted. Thank you