Download the XML query ADF Table line

I have a request to adf with the data obtained in the adf table that has a column 'ID' with a link. How to get the value of link ID selected in the bean class and download the XML from DB?

Java (TM) Platform1.7.0_51
Oracle IDE12.1.3.0.41.140521.1008

Here's the Code to work. Thanks for all the help.


  
  
  

And the Bean.download)

inputstream = blobdomain.getInputStream();
// copy blob to output
byte[] buffer = new byte[4096];
int nread;
while ((nread = inputstream.read(buffer)) != -1) {
  outputStream.write(buffer, 0, nread);
}
outputStream.close();
outputStream.flush();
inputstream.close();
blobdomain.closeInputStream();

Tags: Java

Similar Questions

  • Help to download the xml of the oracle table below

    Dear all,

    I tried best to download the below xml to oracle table but giving the link between the tables is very difficult for me. can someone help me to import the XML below for oracle table

    <? XML version = "1.0" encoding = "utf-8"? >
    < Claim.Submission xmlns:tns = "http://www.haad.ae/DataDictionary/CommonTypes" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: noNamespaceSchemaLocation = "http://www.haad.ae/DataDictionary/CommonTypes/ClaimSubmission.xsd" >
    < header >
    MF65 < SenderID > < / SenderID >
    C014 < ReceiverID > < / ReceiverID >
    < TransactionDate > 03/12/2012 10:40 < / TransactionDate >
    < RecordCount > 1 < / RecordCount >
    < DispositionFlag > PRODUCTION < / DispositionFlag >
    < / header >
    < claim >
    < ID > 23112 / < ID >
    < MemberID > 100000874 < / MemberID >
    A022 < PayerID > < / PayerID >
    MF65 < ProviderID > < / ProviderID >
    < EmiratesIDNumber > 111-1111-1111111-1 < / EmiratesIDNumber >
    < raw > 115 < / gross >
    < PatientShare > 20 < / PatientShare >
    < net > 95 < / Net >
    < meeting >
    MF65 < FacilityID > < / FacilityID >
    < type > 1 < / Type >
    < > 47685 PatientID < / PatientID >
    < Start > 02/11/2012 12:00 < / Start >
    < / meeting >
    < Diagnostics >
    Principal of < type > < / Type >
    < code > < code > 461.9
    < / Diagnosis >
    < Diagnostics >
    Secondary < type > < / Type >
    < code > < code > 462
    < / Diagnosis >
    < activity >
    23112_1 < ID > < /ID >
    < Start > 02/11/2012 12:00 < / Start >
    < type > 3 < / Type >
    < code > < code > 99202
    < quantity > 1 < / quantity >
    < net > 95 < / Net >
    D1310 < clinician > < / clinician >
    < / activity >
    < / claim >
    < Claim.Submission >

    Pls tell me how I can get

    Have you considered using the storage relational object for this?
    Since you have patterns, you could record in the database, which will automatically create storage appropriate for your XML documents as well as validate at the time of insertion.
    You can then create individual views to query the nested parts of the document and finally insert the data into relational tables final.

    See the documentation for an introduction to the concepts:
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/partpg2.htm#g997354

    You will find examples on the {forum: id = 34} forum and its FAQ: {: identifier of the thread = 410714}

  • Download the XML to the server

    Hi friends,

    I'm trying to load the XML to the server, how can I do this...

    should I read the file via Document (org)... and put it in the inputstream then I coppy all data... http outputstream?

    Please tell me the procedure

    You are on the right track.

    Steps to follow:
    (1) create XML.
    2) convert it to a bytearray from XML code.
    (3) open a http connection.
    (4) create an outputstream and copy the bytearray.
    (5) before send it to the server, set the content length and content type.
    (6) checking the response code.
    (7) close the connections

  • fileDownloadActionListener download the PDF in ADF 11

    Hello

    I have a requirement to download the PDF file on the file system. I use fileDownloadActionListener. I use the following code.

    < af:commandLink text = "Download the stored PDF file" >
    < af:fileDownloadActionListener filename = ' #{rank. " «First name} .pdf»
    contentType = application/pdf"; Charset = UTF-8 ".
    Method = "#{FindReports.reportPDFDownload}" / >
    < / af:commandLink >

    Managed code bean

    public void reportPDFDownload (FacesContext facesContext,
    OutputStream outputStream) throws IOException {}
    OutputStreamWriter w = new OutputStreamWriter (outputStream, "UTF - 8");
    InputStream in = getReportDocument(); extract data from DB
    System.out.println ("input file is:" + in);
    ubyte [] buffer = new byte [DEFAULT_BUFFER_SIZE];
    int length;
    While ((length = in.read (buffer)) > 0) {}
    w.Write (buffer. ToString());
    }
    w.Flush ();
    w.Close ();
    }


    When I open the file downloaded, it says file corrupted or not properly decoded. I checked the size of the file, it is 10 bytes.

    Could anyone suggest me how to solve the problem?

    Thank you
    Reena

    Hello, Reena. Try this code fragment:

    BufferedOutputStream bos = new BufferedOutputStream (outputStream);

    Byte [] buff = new ubyte [DEFAULT_BUFFER_SIZE];
    int bytesRead;

    While (-1! = (bytesRead = is.read (buff, 0, buff.length))) {}

    Bos.Write (buff, 0, bytesRead);

    }
    Bos.Flush ();
    Bos.Close ();

    Kind regards
    Eugene

  • Download the XML data in an oracle table

    I need to download data from an XML file to the oracle table.
    I use 10.1.0.3.0 database.

    Refer to the Oracle XML DB Developer's Guide - loading XML in Oracle XML DB content

  • generate the xml to oracle table

    Hello

    I want to generate xml form an oracle table and using the sql express oracle developer 10 g, forler xdk is decompressed also under folder oracle express, still getting the following error: code used
    var g_clob clob;
    
     declare
         l_ctx  dbms_xmlquery.ctxHandle;
         l_clob clob;
        begin
          l_ctx := dbms_xmlquery.newContext('select * from scott.emp');
          dbms_lob.createtemporary(:g_clob,true,dbms_lob.session);
          :g_clob := dbms_xmlquery.getXml(l_ctx);
        end;
        /
    ORA-06550: line 2, column 14:
    PLS-00201: identifier ' DBMS_XMLQUERY. CTXHANDLE' must be declared

    Thanks in advance

    Hello

    DBMS_XMLQUERY is a wrapper for the methods in the Java class "oracle.xml.sql.query.OracleXMLStaticQuery".
    The problem is that Oracle 10 g XE is not a JAVA virtual machine, you can not use this package.

    Use DBMS_XMLGEN instead, it provides similar functionality and is more effective (C-based):

    SQL> var g_clob clob
    SQL> DECLARE
      2    l_ctx    dbms_xmlgen.ctxHandle;
      3  BEGIN
      4    l_ctx := dbms_xmlgen.newContext('select * from scott.emp');
      5    :g_clob := dbms_xmlgen.getXML(l_ctx);
      6    dbms_xmlgen.closeContext(l_ctx);
      7  END;
      8  /
    
    PL/SQL procedure successfully completed.
    
    SQL> set long 5000
    SQL> set pages 1000
    SQL> print g_clob
    
    G_CLOB
    --------------------------------------------------------------------------------
    
    
     
      7369
      SMITH
      CLERK
      7902
      17/12/80
      800
      20
     
     
      7499
      ALLEN
      SALESMAN
      7698
      20/02/81
      1600
      300
      30
     
     
      7521
      WARD
      SALESMAN
      7698
      22/02/81
      1250
      500
      30
     
     
      7566
      JONES
      MANAGER
      7839
      02/04/81
      2975
      20
     
     
      7654
      MARTIN
      SALESMAN
      7698
      28/09/81
      1250
      1400
      30
     
     
      7698
      BLAKE
      MANAGER
      7839
      01/05/81
      2850
      30
     
     
      7782
      CLARK
      MANAGER
      7839
      09/06/81
      2450
      10
     
     
      7839
      KING
      PRESIDENT
      17/11/81
      5000
      10
     
     
      7844
      TURNER
      SALESMAN
      7698
      08/09/81
      1500
      0
      30
     
     
      7900
      JAMES
      CLERK
      7698
      03/12/81
      950
      30
     
     
      7902
      FORD
      ANALYST
      7566
      03/12/81
      3000
      20
     
     
      7934
      MILLER
      CLERK
      7782
      23/01/82
      1300
      10
     
    
    

    Or, using the SQL/XML functions:

    SELECT XMLElement("ROWSET",
             XMLAgg(
               XMLElement("ROW",
                 XMLForest(empno, ename, job, mgr, hiredate, sal, comm, deptno)
               )
             )
           ).getClobVal()
    FROM scott.emp
    ;
    
  • Clear the check box in the new if invalid table line

    Hi all.

    I use JDev version 11.1.2.4.0.

    I have a table with 2 columns, which one of them is a checkbox. I want to clear this check box if the user inserts a newline invalid. So far, I have an EL expression in my field to disable: disabled = "#{viewScope.viewBean.disable}", where a Boolean variable disable is. "

    I put the variable Boolean true when the user inserts a line not valid, but I am not able to update the fields. The only way I can do this is to update the entire table, but then I lose the filters.

    For example, I want to do something like this:

    I have a VO employed with the salary attribute where the user can search/insert/update / delete. The user searches for all employees with > 30 k salary. Then, the user inserts a new employee, but he or she inserts one that's already in the DB. So, the line is not valid. I want to disable the all check box in my table WITHOUT losing the > 30 k search salary. If I update the entire table, the search has disappeared and all employees are shown.

    Any ideas?

    Edit: I also tried this approach, but I had the same problem with a refreshing existing lines: https://udayarocks.wordpress.com/2011/07/30/how-to-conditionally-enable-disable-the-column-contents-in-the-adf-11g-table...

    The transitional value will remain if it is added to the OS, not the VO.

    Timo

  • Download the Plugin Query IR

    I'm trying to use the Plugin to "Get IR Query" of https://apex.oracle.com/pls/apex/f?p=43045:1 and most of the time that it seems to work and returning valid code but I seem to have problems with concatenated columns and regular expressions.

    If I use an concatenated columns and regular expression in search criteria, an additional line seems to be added to the returned sql

    The additional line of code is 'and doesn't like ' 00' 0% " but its not valid (its lack a quote and |)"» so sql cannot be used elsewhere.

    I created an example here to display question

    https://Apex.Oracle.com/pls/Apex/f?p=86093:1

    If you select the top option will then search for a line further incorrect ((deuxieme from bottom) is added, if it is disabled then the generated sql code is OK

    I implemented the plugin bad?

    Thanks in advance

    With the help of everyone.

    It seems that the problem was in the loop that has replaced the bind variable, if there are 10 or several variables it would replace the first occurrence of the variable name to bind and a portion of those above 10 e.g. APXWS_EXPR_1 and APXWS_EXPR_10 would become FILTER_TEXT and FILTER_TEXT0, would remain set to 0 at the end.

    Changed replace to a regexp_replace which replaces only the first found occurrence and it seems to work

    regexp_replace (v_query,

    ':' || v_report .name. Binds (i),

    '''' || v_report. Binds (i) .value. ''''

    1: 1);

    I made the change to my example on apex.oracle.com and it seems to work fine now.

  • Download the Blob in ADF

    Hello

    I want to downlod file Blob of the Oracle database in the adf, can someone help me with this task.

    Thanx.

    See online, download and store the data into a blob

    JDev11.1.2.1.0: Manipulation of images/files ADF (part 2) | JDev & amp; Goodies from the ADF

  • Variable binding and View object to filter the results of ADF table

    I created a view ADF object where I compare "USERID =: USER_ID" in sql. I created a table with this ViewObject on a .jspx page.

    I use the following code in the support to the Bind Variable has a value:


    String uidregAMDef =
    'mil.navy.comfisc.uid.toolkit.model.UIDToolkitModule ';
    String uidregConfig = "UIDToolkitModuleLocal";

    Check out the module
    UIDToolkitModuleImpl = uidAM
    (UIDToolkitModuleImpl) Configuration.createRootApplicationModule (uidregAMDef,
    uidregConfig);

    ViewObject vo = uidAM.findViewObject("CurrentContent1");
    vo.setNamedWhereClauseParam ("USER_ID", 2);

    vo.executeQuery ();

    Configuration.releaseRootApplicationModule (uidAM, true);


    Returns a null value.
    }



    The result I'm looking for is the TABLE to refresh after that code runs to just display the values where the: USER_ID = 2


    However, the table does IS NOT refresh... I do not get a runtime or compile... errors but the picture is not updated, even if the setNamedWhereClauseParam seems well.



    Any suggestions? The original Version should not update with the setNamedWhereClauseParam?


    Thank you

    Published by: [john72] Sep 8, 2008 10:52

    Hi John72

    In your case is more recommended the use of the method of the page definition and iterator, you can add the filter to your page just definition method drag and drop the ExecuteWithParams method as a button of operations in your jsp/jspx page, in the page definition are created automatic ExecuteWithParams and var bind method, you can now create an action of your button and add the following code :

    public String commandButton1_action() {}
    DCIteratorBinding iter = (DCIteratorBinding) bindings.get ('variables');
    iter.getBindingContainer () .getVariableManager () .setVariableValue ("MyVar", "value");

    execute the method

    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("ExecuteWithParams");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    }

    Good luck

  • Issue, while the creation of ADF Table programmatically

    Hello

    I am creating a table programmatically... And I've implemented as below:
                RichTable phoneTable = new RichTable();
                phoneTable.setEmptyText("No Phone Details yet");
                getContactPhone(contactObj.getPhone());
    
                phoneTable.setValue(contactObj.getPhone()); 
    // contactObj.getPhone() is a ArrayList<TelephoneBOD> in pojo Object...
    // Which is taken from a Object returned from DataControl Method (Captured in pageFlowScope)
    
                phoneTable.setVar("row");
    
                // Add Columns
                RichColumn column = new RichColumn();
                column.setHeaderText("Type");
                column.setId("phoneType");
                column.setAlign("right");
                column.setWidth("100");
                // Set output.
                RichOutputText output = new RichOutputText();
                output.setValue("#{row.phoneType}");
                // Add output into column.
                column.getChildren().add(output);
                // Add column into table.
                phoneTable.getChildren().add(column);
    When I try to implement that way I get fllowing error:

    Popup:
    ZIP_STATE_FAILED
    
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2
    Journal:
    Caused By: java.io.NotSerializableException: org.ieee.internal.ws.proxy.conf.types.TelephoneBOD
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at java.util.ArrayList.writeObject(ArrayList.java:570)
         at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:239)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:241)
         at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    I think that what is happening because I'm not serialize the object to Table. If this is the reason why... How to serialize the object?
    Or I'm missing something in the code?

    Thank you
    Thoom

    Published by: User007 on August 31, 2011 13:47

    Published by: User007 on August 31, 2011 13:47

    Your TelephoneBOD class must implement the serializable interface.
    Just add

    implements serializable
    

    for your class and it should work. You don't have to implement anything.

    Timo

  • Generation of the XML from the Oracle tables

    I'm using Oracle 11 g R1.

    I have two tables header and the line:

    CREATE THE TABLE HEADER
    (
    EXPENSE_INFO VARCHAR2 (2000).
    NUMBER OF ERROR_CODE,
    REASON_OF_FAILURE VARCHAR2 (4000)
    )
    /


    CREATE THE ROW IN THE TABLE
    (
    EXPENSE_INFO VARCHAR2 (2000).
    DATE OF EXPENSE_DATE,
    EXPENSE_CODE VARCHAR2 (10),
    EXPENSE_REF VARCHAR2 (2000).
    GROSS_AMOUNT NUMBER,
    NUMBER OF TAX_AMOUNT,
    NUMBER OF ERROR_CODE,
    REASON_OF_FAILURE VARCHAR2 (4000)
    )
    /

    These tables are linked by the EXPENSE_INFO column.

    Complete the tables with the following data:

    Insert in the header (ErrorCode, EXPENSE_INFO, REASON_OF_FAILURE)
    values ('A', 0, 'SUCCESS');

    Insert (EXPENSE_INFO, EXPENSE_DATE, EXPENSE_CODE, EXPENSE_REF, GROSS_AMOUNT, TAX_AMOUNT, ERROR_CODE, REASON_OF_FAILURE) online
    values ('A', to_date (December 14, 2012 ', 'dd-mm-yyyy'), 'ABC', 'HOTEL', 100, 500, 0, 'SUCCESS');

    Insert (EXPENSE_INFO, EXPENSE_DATE, EXPENSE_CODE, EXPENSE_REF, GROSS_AMOUNT, TAX_AMOUNT, ERROR_CODE, REASON_OF_FAILURE) online
    values ('A', to_date (December 14, 2012 ', 'dd-mm-yyyy'), 'DEF', 'MOVIE', 10, 50, 1, "Cost Code does not exist.");

    Insert in the header (ErrorCode, EXPENSE_INFO, REASON_OF_FAILURE)
    values ('B', 1, "Emp Id does not exist.");

    Insert (EXPENSE_INFO, EXPENSE_DATE, EXPENSE_CODE, EXPENSE_REF, GROSS_AMOUNT, TAX_AMOUNT, ERROR_CODE, REASON_OF_FAILURE) online
    values ('B', to_date (December 14, 2012 ', 'dd-mm-yyyy'), "XYZ", "MILEAGE", 200, 300, 0, 'SUCCESS');



    I want to generate the XML following these tables:


    COSTS of <>
    < EXPENSE_DETAILS >
    < EXPENSE_INFO > is < / EXPENSE_INFO >
    < ERROR_CODE > 0 < / ERROR_CODE >
    SUCCESS of < REASON_OF_FAILURE > < / REASON_OF_FAILURE >
    < EXPENSE_LINES >
    < EXPENSE_LINE_REC >
    < EXPENSE_INFO > is < / EXPENSE_INFO >
    < EXPENSE_DATE > 14/12/2012 00:00:00 < / EXPENSE_DATE >
    ABC of < EXPENSE_CODE > < / EXPENSE_CODE >
    HOTEL < EXPENSE_REF > < / EXPENSE_REF >
    < GROSS_AMOUNT > 100 < / GROSS_AMOUNT >
    < > 500 TAX_AMOUNT < / TAX_AMOUNT >
    < ERROR_CODE > 0 < / ERROR_CODE >
    SUCCESS of < REASON_OF_FAILURE > < / REASON_OF_FAILURE >
    < / EXPENSE_LINE_REC >
    < EXPENSE_LINE_REC >
    < EXPENSE_INFO > is < / EXPENSE_INFO >
    < EXPENSE_DATE > 14/12/2012 00:00:00 < / EXPENSE_DATE >
    DEF < EXPENSE_CODE > < / EXPENSE_CODE >
    FILM of < EXPENSE_REF > < / EXPENSE_REF >
    < GROSS_AMOUNT > 10 < / GROSS_AMOUNT >
    < TAX_AMOUNT > 50 < / TAX_AMOUNT >
    < ERROR_CODE > 1 < / ERROR_CODE >
    < REASON_OF_FAILURE > fresh Code does not exist. < / REASON_OF_FAILURE >
    < / EXPENSE_LINE_REC >
    < / EXPENSE_LINES >
    < / EXPENSE_DETAILS >
    < EXPENSE_DETAILS >
    B < EXPENSE_INFO > < / EXPENSE_INFO >
    < ERROR_CODE > 1 < / ERROR_CODE >
    < REASON_OF_FAILURE > Employee Id does not exist. < / REASON_OF_FAILURE >
    < EXPENSE_LINES >
    < EXPENSE_LINE_REC >
    B < EXPENSE_INFO > < / EXPENSE_INFO >
    < EXPENSE_DATE > 14/12/2012 00:00:00 < / EXPENSE_DATE >
    XYZ < EXPENSE_CODE > < / EXPENSE_CODE >
    POINT MILE < EXPENSE_REF > < / EXPENSE_REF >
    < > 200 GROSS_AMOUNT < / GROSS_AMOUNT >
    < > 300 TAX_AMOUNT < / TAX_AMOUNT >
    < ERROR_CODE > 0 < / ERROR_CODE >
    SUCCESS of < REASON_OF_FAILURE > < / REASON_OF_FAILURE >
    < / EXPENSE_LINE_REC >
    < / EXPENSE_LINES >
    < / EXPENSE_DETAILS >
    < / SPENDING >


    I'm not able to generate the XML file. Kindly help me.

    Kind regards
    Sudhanshu

    I love working at the deepest level and then "wrap" with external level tags.

    You want to list all columns of each LINE by line. XMLFOREST is good for this:

    select xmlforest(
      expense_info, expense_date, expense_code, expense_ref,
      gross_amount, tax_amount, error_code, reason_of_failure
    )
    from line;
    
    A
    2012-12-14
    ABC
    HOTEL
    100
    500
    0
    SUCCESS
    ...
    

    Now you want to wrap this up in EXPENSE_LINE_REC

    select xmlelement("EXPENSE_LINE_REC",
      xmlforest(
        expense_info, expense_date, expense_code, expense_ref,
        gross_amount, tax_amount, error_code, reason_of_failure
      )
    )
    from line;
    
    
      A
      2012-12-14
      ABC
      HOTEL
      100
      500
      0
      SUCCESS
    
    

    So far, you have a XML fragment by line in the table of the LINE. You can use XMLAGG to put those together in a single fragment - or rather, a fragment by EXPENSE_INFO.

    Then you use XMLELEMENT again to give the name "EXPENSE_LINES" in this fragment.

    Then you gather the header values and the 'EXPENSE_LINES' fragment in "EXPENSE_DETAILS". This gives you all the information for each row header and associated lines of the LINE.

    Then, you gather all the information into one with XMLAGG header, and give everything a name with XMLELEMENT

    select xmlelement("EXPENSES",
      xmlagg(
        xmlelement("EXPENSE_DETAILS",
          xmlforest(expense_info, a.error_code, a.reason_of_failure),
          xmlelement("EXPENSE_LINES",
            xmlagg(
              xmlelement("EXPENSE_LINE_REC",
                xmlforest(
                  b.expense_date, b.expense_code, b.expense_ref,
                  b.gross_amount, b.tax_amount, b.error_code, b.reason_of_failure
                )
              )
            )
          )
        )
      )
    )
    from header a join line b using(expense_info)
    group by expense_info, a.error_code, a.reason_of_failure;
    

    _Note: _ with the GROUP BY clause, you can 'total' twice, once at the expense_info level and then overall. That's what I do with the two XMLAGGs: the second he puts just all the different stuff EXPENSE_DETAILS together in one package that I wrap "CHARGES" tag autour.

    Also, I omit EXPENSE_INFO of each LINE as it is already in the header information.

    Published by: stew Ashton on December 17, 2012 14:03

  • Structure of hybrid data - relational &amp; structural using the XML file

    Hello world
    I do not understand this conceptualization of the XMLDB maybe not for what and how it was designed for.

    I have 100 000 (Mutual Funds) XML files I loaded in the DB Table (XMLType column). (Each XML file is 5 KB of data)
    Now, I want to write a SICAV in which I can put 20 different search criteria. (e.g. Type of Fund, Star, ranking etc etc.)
    (I paginated resultset to 100 lines per page)

    Initially approach I took was to write the XML query using the extractValue function. However, when the results of the research in most large result set, time needed to return query results is huge. Especially at page 100, etc..

    As a hybrid approach, when XMLs are loaded into DB, I want to store 20 attributes in separate table and all XML in a separate table.
    and when extractValue queries are written to what ORACLE automatically re-writes of applications to use the flat table when it is made reference to specific attributes otherwise it load the XML table.

    Suggestions box will be greatly appreciated, if not I can always write queries to load a separate table and query it for the purposes of the screen.

    856584 wrote:
    Hello world
    I do not understand this conceptualization of the XMLDB maybe not for what & how it was designed for.

    I was conceived to manage XML, nothing more, nothing less.

    I have 100 000 (Mutual Funds) XML files I loaded in the DB Table (XMLType column). (Each XML file is 5 KB of data)
    Now, I want to write a SICAV in which I can put 20 different search criteria. (e.g. Type of Fund, Star, ranking etc etc.)
    (I paginated resultset to 100 lines per page)

    Which version of the database (all the numbers please)?

    Probably you have chosen the wrong "XMLType" storage model (and therefore no performance)
    Read here:
    http://www.Oracle.com/technetwork/database/features/xmldb/xmlchoosestorage-v1-132078.PDF

    Initially approach I took was to write the XML query using the extractValue function. However, when the results of the research in most large result set, time needed to return query results is huge. Especially at page 100, etc..

    As a hybrid approach, when XMLs are loaded into DB, I want to store 20 attributes in separate table and all XML in a separate table.
    and when extractValue queries are written to what ORACLE automatically re-writes of applications to use the flat table when it is made reference to specific attributes otherwise it load the XML table.

    Suggestions box will be greatly appreciated, if not I can always write queries to load a separate table and query it for the purposes of the screen.

    Read the given URL/pdf first.

  • How can I get rid of "warning: query exceeded 200 lines..." message

    Hello

    I have a custom page to question the details of our inventory. I show 100 lines on the page. I noticed today I can hit him then once and then I get the message "query exceeded 200 lines. Potentially more rows exist, please limit your query "." If I try to export this data using an export to Excel button, it gives me the message "there are no data to export.

    I am VERY new to OAF... y at - it a property or something somewhere that I can change to fix this? We will have potentially 100s of thousands of records to view and export, so 200 is simply not acceptable.

    We are on ATG RUP7 11.5.10.2. It is a fully customized page, pulling of custom tables. Please let me know if any other information is needed.

    Thank you
    Janel

    You need to reset the option profile ' FND: view object Fetch Size Max "of 200 (default) to the value that you think fits your needs.

    Please note that the definition of a very high value for this profile can impact performance, and I recommend you test first before deploying on production.

    Thank you
    Shailendra

  • IMAQdx attributes listed in the xml file not found in labview

    Hello

    Some attributes of my camera our watch camera (DALSA CamExpert) software but are not displayed in MAX.

    When I opened the xml file, I don't see a difference between the attributes shown and hidden.

    Why LabView displays all possible attributes?

    The sml file has specific requirements?

    Any ideas?

    Hello Eric,

    I solved the problem yesterday!

    I use a DALSA camera. Dalsa software downloads the XML file and saves it in a directory 'dalsa"on my local disk.

    National instruments software (MAX) downloaded XML file and saves it in another directory. The 2 files were not equal. I replaced the XML file OR the XML of Dalsa file and now I'm able to get all attributes.

    But thanks for your response!

    Kind regards

    Kim

Maybe you are looking for