Getting file node name from SQL query

Hello everyone,
I have a concurrent request that requires the file node name as input. For example, when I login to oracle on our test instance , I use http://moon1.oando-plc.com:8000. For this concurrent program, the file node name is shown as moon1.oando-plc.com.
I need to use this argument in a PL/SQL procedure I am writing and I don't want to use any hardcoding.
Is there any way to get this data from an SQL statement.
Thanks

Hi,
You can get it from ICX_PARAMETERS table (HOME_URL column). Orsearch the profile options values for "http" to get the login page URL (and/or server name) -- See (Note: 201945.1 - How to list E-Business Suite Profile Option values for all levels using SQLPlus).
Regards,
Hussein

Similar Messages

  • Get xml node name from clob in loop

    Hi,
    i hv a procedure to get the xml data's(values of the xml) from a clob. in a table.it works fine the parent tags but if the same tag is there for two times then i am not able to loop it because i dont know the tag name for which the loop should be run.
    to be clear.
    <root>
    <tag1>value1
    </tag1>
    <tag1>value2
    </tag1>
    </root>
    i need to run some fns for each node value so i need to loop for each node having same value pls help me to get the node name.

    You can simply alter get xml node name in loop to return a count on just the node you are looking for. Not sure why you need to know the count when you can have the logic iterate through the nodes for you, either as an XMLType or a DOMDocument (see nodelist).

  • Get Comma separated result from SQL Query

    Hey Everyone
    I have a requirement where i need to get comma separated result of names because there is one to many relationship i.e for every protocol there are mutiple people associated to it , and i created PL/SQL function for that and everything was fine and when it is in production multiple number of cursors were opened because of the logic and leading to RAC fail over and for that we were manually clearing the cursors every weekend and i am looking to create a Materialized view for this logic but i was unable to code the logic using Connect by clause
    Result is like and i want comma separated names for every protocol
    P06065     TESTER13 TESTER13
    P02095     PATRICIA CARMELITANO
    P02095     ANNE MUIR
    P02095     ROBERT HARLOW
    P02095     JANICE ALBERT
    P02095     Jacqueline van Dalen
    P02095     GUENTER HENNIG DR.
    P05209     Olga Xenaki
    P05553     Birgit Limbach-Angele
    P05553     Anja Schulz Dr.
    P05553     CHRISTA HAGENBUCHER
    here is the function which i wrote, i need to get the same logic through SQL Statement .. thanks for your help
    cursor c_GSCR is
    select T565804.FST_NAME||' '||T565804.LAST_NAME
    from
    S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
    S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
    S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
    where ( T541903.ROW_ID = T544105.CL_PTCL_ID and
    T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
    T544105.ROLE_CD = 'Lead Project Manager' AND
    T541903.ROW_ID = v_PTCL_ID and
    T541903.PAR_PTCL_ID is null and T544105.END_DT is null );
    BEGIN
    l_row_num := 0;
    l_role := '';
    l_role_list := '';
    v_PTCL_ID := PTCL_ID;
    OPEN C_GSCR;
    if C_GSCR%isopen THEN
    LOOP
    FETCH C_GSCR INTO l_role;
    exit when C_GSCR%notfound;
    IF l_role_list IS NULL THEN
    l_role_list:=l_role;
    ELSE
    l_role_list:=l_role_list||', '||l_role;
    END IF;
    END LOOP;
    CLOSE C_GSCR;
    end if;
    ~Srix

    Hi,
    Srix wrote:
    Thanks for the Info .. My database in 10g R 2 i started using COLLECT Function
    select T541903.PTCL_NUM ,
    CAST(COLLECT(T565804.FST_NAME||' '||T565804.LAST_NAME) AS varchar2_ntt) , 7) AS LPM_NAME
    from
    S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
    S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
    S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
    where T541903.ROW_ID = T544105.CL_PTCL_ID and
    T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
    T544105.ROLE_CD = 'Lead Project Manager' AND
    T541903.PAR_PTCL_ID is null and T544105.END_DT is null
    GROUP BY T541903.PTCL_NUM
    The result i like ...Do you mean "The result *is* like ..."?
    Or do you mean "The result I [would] like [is] ..."?
    The code above has unblanaced parentheses. If you are getting anything other than an error message, then I don't believe you are really running what you posted.
    Whenever you have a problem, post a complete test script that people can use to recreate the problem and test their ideas.
    Please do that. Post CREATE TABLE and INSERT statements to crate the sample data, the code you used to create the carachr2_ntt type and the function, and your best attempt at a query (formatted). Simplify as much as possible. For example, do you really need 3 tables to illustrate the problem? For purposes of asking a question on this forum, can't you pretend you have just one table, with 2 columns?
    I suspect the problem has to do with the user-defined type and function, which you didn't post. I can't even see how you called the function in your query. Without the information I mentioned above, there's not much I can do to help you.

  • Need tool/utility to get list of tables from sql query

    Hi,
    I often have to analyze huge queries without having access to database. Is there any tool where I can submit the a sql query and it gives me list of tables used in the query.  I also need similar thing for documentation.
    Let me know if anybody uses anything like this.
    Thanks.
    liquidloop[at]live[dot]co[dot]uk

    You can find the size of each table, and thus list the tables in the process.
    SET NOCOUNT ON
    DBCC UPDATEUSAGE(0)
    -- DB size.
    EXEC sp_spaceused
    -- Table row counts and sizes.
    CREATE TABLE #t
    [name] NVARCHAR(128),
    [rows] CHAR(11),
    reserved VARCHAR(18),
    data VARCHAR(18),
    index_size VARCHAR(18),
    unused VARCHAR(18)
    INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?'''
    SELECT *
    FROM #t
    -- # of rows.
    SELECT SUM(CAST([rows] AS int)) AS [rows]
    FROM #t
    SELECT
    t.NAME AS TableName,
    p.rows AS RowCounts,
    SUM(a.total_pages) * 8 AS TotalSpaceKB,
    SUM(a.used_pages) * 8 AS UsedSpaceKB,
    (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
    FROM
    sys.tables t
    INNER JOIN
    sys.indexes i ON t.OBJECT_ID = i.object_id
    INNER JOIN
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
    INNER JOIN
    sys.allocation_units a ON p.partition_id = a.container_id
    WHERE
    t.NAME NOT LIKE 'dt%'
    AND t.is_ms_shipped = 0
    AND i.OBJECT_ID > 255
    GROUP BY
    t.Name, p.Rows
    ORDER BY
    t.Name
    --- SQL2005
    select o.name
    , reservedpages = sum(a.total_pages)
    , usedpages = sum(a.used_pages)
    , pages = sum(case when a.type <> 1 then a.used_pages
    when p.index_id < 2 then a.data_pages else 0 end)
    , SUM(a.used_pages)*8096 AS 'Size(B)'
    , rows = sum(case when (p.index_id < 2) and (a.type = 1) then p.rows else 0 end)
    from sys.objects o
    join sys.partitions p on p.object_id = o.object_id
    join sys.allocation_units a on p.partition_id = a.container_id
    where o.type = 'U'
    group by o.name
    order by 3 desc --biggest tables first
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How to remove database name from SQL query

    We have an MS SQL server with several databases that are of the same schema but have different data.  We do this for testing different environments.  We are using Crystal reports for the first time and we are having trouble changing the database location in the designer.  If update the data source location to the same database server, but different database name, the data still comes from the original database used when creating the report.  We look at the SQL query and it contains the database name and does not change when updating the data source.  Therefore the data always comes from the database used when originally creating the report.
    How can I remove the database name from the SQL query so the proper database is used when testing the report?

    Hi C F
    Please ensure you have followed the procedure mentioned below:
    In Crystal Reports, there are two ways to set the location of the data source your report points to, depending on your connection type.
    For ODBC and Native Connections:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click the data source to be changed. You must click each individual table in the data source one by one. If the data source is a stored procedure you will not see individual tables.
    NOTE     In Crystal Reports 10, XIR1, and XIR2, if you are mapping from a data source such as a stored procedure where the report designer can not determine which fields should be mapped automatically, you will see a 'Mapping' dialog box where you can manually map fields, as in the procedure cited above.
    3. In the 'Replace with' section, click the data source you want the report to use.
    4. Click 'Update'.
    5. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    For Native Connections Only:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click 'Properties' to expand it and right-click 'Database Name: <path to database>'.
    3. Click 'Edit' and then type the path to the
    new data source location.
    4. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    Regards
    Girish

  • Getting a Mapping Diagram from SQL Query

    Hi,
    I have 2 schemas: SOURCE and TARGET.
    A previous developer had written an SQL Query to transform and load data from 3 tables from SOURCE schema into 1 table in the TARGET schema. It is working fine by use of the grants and synonyms that I have created.
    My query is: Now I would like to convert this SQL query or transformation into a diagram. The diagram would show the columns of the source tables and the transformations which are then loaded into the target table.
    Kindly advice which tool or software I can use for this? Or, should I go with the manual approach?
    Regards,
    Suddhasatwa

    Hi
    Can you advice which options I should select in TOAD or SQL Developer?
    I have done bit of research from my end, but am not able to find any suitable option.
    Many Thanks,
    Suddhasatwa Bhaumik.

  • How to get the desire output from sql query

    Consider an Order Table: ...
    Order Table:
    Order Id Item Qty
    O1 A1 5
    O2 A2 1
    O3 A3 3
    Please provide SQL which will explode the above data into single unit level records as shown below
    Desired Output:
    Order Id Order Id Qty
    O1 A1 1
    O1 A1 1
    O1 A1 1
    O1 A1 1
    O1 A1 1
    O2 A2 1
    O3 A3 1
    O3 A3 1
    O3 A3 1

    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Getting table name from a query

    Hi, I'm trying to get the table name from my sql query
    My code is as follows;
    ResultSetMetaData metadata = rs.getMetaData();
    for (int i = 1; i < metadata.getColumnCount(); i++)
    System.out.println(metadata.getTableName(i));
    I just get a blank output. Yet my sql query executes and I can pull down the records, and grab the column names from the result sets.
    Any ideas on how I can get the table name for the columns. The reason being is on one of my querys I'm using join statements and i need to retrieve the table name for the column i'm displaying, as some tables have similar column names.
    Thanks in advance.

    Hi,
    What db are you using?
    I also get a blank output with ResultSetMetaData.getTableName because Oracle doesn't implement this method.
    Why do you not know the table name anyway?
    regards
    Nick

  • Getting zero-sized reply error when running report from SQL query

    Hi,
    I have a Report from SQL Query in Portal. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
    ERROR
    The requested URL could not be retrieved
    While trying to retrieve the URL: <data suppressed>
    The following error was encountered:
    Zero Sized Reply
    Squid did not receive any data for this request.
    Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
    Thanks,
    Lorena

    Problem comes when any of the filter is applied in any one of the cases selected from the GUI.Do you mean that the problems only shows when you run the report in your browser via 9iAS?
    Which version are you using?
    Can you post the before report trigger?

  • Getting Zero Sized Reply error in report from SQL query

    Hi,
    I have a Report from SQL Query in Portal 3.0.9. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
    ERROR
    The requested URL could not be retrieved
    While trying to retrieve the URL: <data suppressed>
    The following error was encountered:
    Zero Sized Reply
    Squid did not receive any data for this request.
    Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
    Thanks,
    Lorena

    Hi,
    I have a Report from SQL Query in Portal 3.0.9. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
    ERROR
    The requested URL could not be retrieved
    While trying to retrieve the URL: <data suppressed>
    The following error was encountered:
    Zero Sized Reply
    Squid did not receive any data for this request.
    Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
    Thanks,
    Lorena

  • Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration: Agentry Error

    Hello Experts,
    I follow the flightbooking tutorial to create a Material application to get material list. I  can start the agentry server but when I connect to SAP server and get data, I face below issue
    Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER
    I check the parameters name in SAP Agentry Config panel, all are correct. Why cannt it get the data. Do I have to add anything in javaBE.ini? Please help me. Thank you very much.
    My javaBE
    [HOST]
    server=be1.vdc.csc.com
    APPNAME=ZCH_MATERIALLIST
    [CLIENT_NUM]
    CLIENT=800
    [SYSTEM_NUM]
    SYSNUM=01
    [LOGON_METHOD]
    ; USER_AUTH if standard UID/Password authentication is used
    ; USER_AUTH_GLOBAL if pooled connections using single UID/Password is used
    ; USER_AUTH_GROUP if UID/Password authentication with SAP Message Server
    ;   (load balancing) is used
    LOGON_METHOD=USER_AUTH
    [GLOBAL_LOGON]
    ; referenced when LOGON_METHOD=USER_AUTH_GLOBAL
    ; uses a pool of connections to the SAP backend all utilizing a single
    ;    UID/password
    UID=
    UPASSWORD=
    SHAREDCONNECTION=0
    GET_PERSONNEL_INFO=
    [SERVICE_LOGON]
    ENABLED=true
    UID=hngu3
    UPASSWORD=xxxxxxx
    UPASSWORDENCODED=false
    [GROUP_LOGON]
    ; referenced when LOGON_METHOD=USER_AUTH_GROUP
    ; individual user authentication using an SAP Message Server which distributes
    ; client connections among a "group" of SAP application servers based on load
    ; balancing criteria
    ; host name or IP address of SAP Message Server
    MESSAGE_SERVER=
    GROUP_NAME=
    SYSTEM_ID=
    CLIENT=
    [LANGUAGE]
    LANG=EN
    [LOGGING]
    Level=4
    [REQUIRED_BAPI_WRAPPER]
    com.syclo.sap.bapi.LoginCheckBAPI=/SYCLO/CORE_SUSR_LOGIN_CHECK
    com.syclo.sap.bapi.RemoteUserCreateBAPI=/SYCLO/CORE_MDW_SESSION1_CRT
    com.syclo.sap.bapi.RemoteParameterGetBAPI=/SYCLO/CORE_MDW_PARAMETER_GET
    com.syclo.sap.bapi.SystemInfoBAPI=/SYCLO/CORE_SYSTINFO_GET
    com.syclo.sap.bapi.ChangePasswordBAPI=/SYCLO/CORE_SUSR_CHANGE_PASSWD
    com.syclo.sap.bapi.CTConfirmationBAPI=/SYCLO/CORE_OUTB_MSG_STAT_UPD
    com.syclo.sap.bapi.DTBAPI=/SYCLO/CORE_DT_GET
    com.syclo.sap.bapi.GetEmployeeDataBAPI=/SYCLO/HR_EMPLOYEE_DATA_GET
    com.syclo.sap.bapi.GetUserDetailBAPI=/SYCLO/CORE_USER_GET_DETAIL
    com.syclo.sap.bapi.GetUserProfileDataBAPI=/SYCLO/CORE_USER_PROFILE_GET
    com.syclo.sap.bapi.PushStatusUpdateBAPI=/SYCLO/CORE_PUSH_STAT_UPD
    com.syclo.sap.bapi.RemoteObjectCreateBAPI=/SYCLO/CORE_MDW_USR_OBJ_CRT
    com.syclo.sap.bapi.RemoteObjectDeleteBAPI=/SYCLO/CORE_MDW_USR_OBJ_DEL
    com.syclo.sap.bapi.RemoteObjectGetBAPI=/SYCLO/CORE_MDW_SESSION_GET
    com.syclo.sap.bapi.RemoteObjectUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
    com.syclo.sap.bapi.RemoteReferenceCreateBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_CRT
    com.syclo.sap.bapi.RemoteReferenceDeleteBAPI=/SYCLO/CORE_MDW_USR_KEYMAP_DEL
    com.syclo.sap.bapi.RemoteReferenceGetBAPI=/SYCLO/CORE_MDW_SESSION_GET
    com.syclo.sap.bapi.RemoteReferenceUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
    com.syclo.sap.bapi.RemoteSessionDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL
    com.syclo.sap.bapi.RemoteUserDeleteBAPI=/SYCLO/CORE_MDW_SESSION1_DEL
    com.syclo.sap.bapi.RemoteUserUpdateBAPI=/SYCLO/CORE_MDW_SESSION_UPD
    com.syclo.sap.bapi.TransactionCommitBAPI=WFD_TRANSACTION_COMMIT
    com.syclo.sap.bapi.SignatureCaptureBAPI=/SYCLO/CS_DOBDSDOCUMENT_CRT

    Hi Tahir, please help me check the log below
    Agentry Runtime Worker Thread###throwExceptionToClient::begin |
    Agentry Runtime Worker Thread###throwExceptionToClient::com.syclo.sap.material.steplet.MaterialSteplet::throwExceptionToClient::397::MaterialSteplet - Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER |
    Agentry Runtime Worker Thread###Exception: 17:15:35 06/17/2014 : 20 (Agentry3), Java Business Logic Error (com.syclo.agentry.BusinessLogicException: MaterialSteplet - Error in getting the BAPIWrapper name from the ini file or SAP mobile configuration. Please check the ini file or the mobile configuration for the bapi key (com.syclo.sap.material.bapi.materialbapi) either in sections BAPI_WRAPPER or REQUIRED_BAPI_WRAPPER),  |
    Agentry Runtime Worker Thread###loggedOut::begin |
    Agentry Runtime Worker Thread###HNGU3: SESSION END |
    Agentry Runtime Worker Thread###BAPI::begin |
    Agentry Runtime Worker Thread###create::nulled repository::created new repository |
    Agentry Runtime Worker Thread###create::/SYCLO/CORE_MDW_SESSION1_DEL Connection ID: com.sap.mw.jco.JCO$Client@2656ed99 |
    Agentry Runtime Worker Thread###create::Function /SYCLO/CORE_MDW_SESSION1_DEL created |

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Need help in Report From SQL Query

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    I tried also increase the page time out in httpd.conf, but no use.
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    user602513 wrote:
    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    I tried also increase the page time out in httpd.conf, but no use.
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?Do you get any errors or warnings or it is just the slow speed which is the issue?
    There could be a variety of reasons for the delayed processing of this report. That includes parameter settings for that page, cache settings, network configurations, etc.
    - explore best optimization for your query;
    - evaluate portal for best performance configuration; you may follow this note (Doc ID: *438794.1* ) for ideas;
    - third: for that particular page carrying that report, you can use caching wisely. browser cache is neither decent for large files, nor practical. instead, explore the page cache settings that portal provides.
    - also look for various log files (application.log and apache logs) if you are getting any warnings reflecting on some kind of processing halt.
    - and last but not the least: if you happen to bring up a portal report with more than 10000 rows for display then think about the usage of the report. Evaluate whether that report is good/useful for anything?
    HTH
    AMN

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • Get xml node name in loop

    Hi,
    i hv a procedure to get the xml data's(values of the xml) from a clob. in a table.it works fine the parent tags but if the same tag is there for two times then i am not able to loop it because i dont know the tag name for which the loop should be run.
    to be clear.
    <root>
    <tag1>value1
    </tag1>
    <tag1>value2
    </tag1>
    </root>
    i need to run some fns for each node value so i need to loop for each node having same value pls help me to get the node name.

    pls help me to get the node name.Still not sure what you are actually trying to accomplish, but maybe this helps:
    SQL> set echo on
    SQL> col node form a30
    SQL> with xml as (
    select xmltype('<root>
    <tag1>value1
    </tag1>
    <tag1>value2
    </tag1>
    </root>') xml from dual)
    select t.column_value.getrootelement() node
      from xml xml,
    table (xmlsequence(xml.xml.extract('//*'))) t
    NODE                         
    root                         
    tag1                         
    tag1                         
    3 rows selected.

Maybe you are looking for

  • Where can I find a tutorial on creating interfaces?

    I think an interface is what I need for the program I am working on, although I haven't found any tutorial on how to create these on the Java Tutorial... Anyone could point me somewhere else where I might learn without bothering anyone? :)

  • Account payable from TRM

    Hello people. Please, I really need help with the customizing to create payments in Account Payables from TRM contracts. Example: I have a fixed-term deposit with transaction "Borrowing". I will have "payments" movement in my contract every month. Ac

  • Authorization object for vL02N

    Hi, I need the Authorization object for the VL02N. My requirement is i need to give authorization for doing PGI in VL02N screen,but the user can only generate the VL02N(no change or modification). How can i control this? pls advice

  • Apple Forced iOS7 update on my iPad2 !

    Apple has forced the iOS7 update file onto my iPAD2 and this update is sitting in the "other" folder indicated by the yellow bar in iTunes. I never wanted to upgrade - how do I get rid of this 2.3 GB file that has eaten away my iPAD capacity? This is

  • Opslaan als sjabloon in Photoshop Elements

    Hallo Ik werk met Photoshop Elements 7. Ik heb een ontwerp gemaakt voor een verticale banner waarop het bedrijfslogo staat. Kan je in PS Elements dit ontwerp opslaan als sjabloon (zoals je dat kan met Office programma's)? Hello Is it possible to save