How to combine query outputs?

How do we use the XSU to take the xml output of one query and append that to another's output, so that the xml is well-formed and will be handled by an xsl transformation?
We use OracleXMLDocGenString and OracleXMLQuery. We worked it once, yet the xml output contains two "<?xml version = '1.0'?>" and therefore won't get transformed via xsl.
You can do this easily using the XSQL servlet by putting all queries within a single .xsql file.
Thanks.

How do we use the XSU to take the xml output of one query and append that to another's output, so that the xml is well-formed and will be handled by an xsl transformation?
We use OracleXMLDocGenString and OracleXMLQuery. We worked it once, yet the xml output contains two "<?xml version = '1.0'?>" and therefore won't get transformed via xsl.
You can do this easily using the XSQL servlet by putting all queries within a single .xsql file.
Thanks.

Similar Messages

  • Combined Query Output as Filter Criteria

    Post Author: imzdo1
    CA Forum: WebIntelligence Reporting
    I have the need to run a combined query to produce a list of document numbers (I have that query working) and then use the output from that query as the filter criteria in an expanded query in the same Universe.  The output from the first query is 6500 document numbers so it would be very time consuming to cut and paste these into a filter 15 or 20 at a time and then pasting the result of the 300 queries needed to get one report.
    I have both reports built, but can not figure out how to link the first report output to the filtering criteria on the second report.  I am using Webi, not full client version.
    Is is possible and if so how?

    Post Author: RobotSlave
    CA Forum: WebIntelligence Reporting
    Hello imzdo1, what type of datasource? the following applies to SQL:
    sounds like you need to create a temporary table in your SQL stored procedure, like so:
    CREATE TABLE #TempDocumentNumbers
    documentNumber int,
    documentName Varchar(20)
    or however many columns you need, then insert into the temporary table using your existing query like so:
    INSERT INTO #TempDocumentNumbers
    SELECT (whatever your select statement is)
    just remember that you will need to have coresponding columns in your temporary table for each column your select statement returns, once you have the values stored in your temporary table you can join on it just like you would on any other table in the database,
    I like to explicitly drop temp tables at the end of my query like so:
    DROP TABLE #TempDocumentNumbers

  • How to get query output data

    Hi,
    I have created procedure to analyze tables. I tried to get output but its not displaye in a proper way. I want to output as like as a query output.
    create or replace procedure tablestats
    as
    begin
    for cur in (SELECT OWNER,TABLE_NAME, NUM_ROWS, BLOCKS, AVG_ROW_LEN,TO_CHAR(LAST_ANALYZED, 'MM/DD/YYYY HH24:MI:SS')FROM DBA_TABLES WHERE OWNER='SCOTT') LOOP
    dbms_output.put_line(cur.owner||' '||' '||cur.table_name||' '||cur.NUM_ROWS||' '||cur.BLOCKS||' '||cur.AVG_ROW_LEN);
    DBMS_STATS.GATHER_TABLE_STATS('scott',cur.table_name);
    end loop;
    end;
    Output came lke this:
    SQL> exec tablestats
    SCOTT  DEPT 4 4 20
    SCOTT  EMP 14 4 38
    SCOTT  SALGRADE 5 4 10
    SCOTT  SERVICE 8 5 12
    SCOTT  BONUS 0 0 0
    PL/SQL procedure successfully completed.
    Acually i want output like..
      1* SELECT OWNER,TABLE_NAME, NUM_ROWS, BLOCKS, AVG_ROW_LEN,TO_CHAR(LAST_ANALYZED, 'MM/DD/YYYY HH24:MI:SS') Last_Analyzed FROM DBA_TABLES WHERE OWNER=
    'SCOTT'
    SQL> /
    OWNER                          TABLE_NAME                       NUM_ROWS     BLOCKS   AVG_ROW_LEN   LAST_ANALYZED
    SCOTT                          DEPT                                             4                   4                 20                   11/27/2013 19:10:44
    SCOTT                          EMP                                            14                   4                 38                    11/27/2013 19:10:44
    SCOTT                          SALGRADE                                   5                   4                 10                    11/27/2013 19:10:44
    SCOTT                          SERVICE                                      8                   5                 12                     11/27/2013 19:10:44
    SCOTT                          BONUS                                        0                    0                  0                      11/27/2013 19:10:44
    Please help me.
    Thanks,

    Hi,
    As John said, PL/SQL doesn't give you any of the nice formatting features that front end tools, like SQL*Plus, provide.  If you want headers, you have to say exactly what they are, and write them yourself.  If you want the columns to line up, you have to decide how long they will be and pad them yourself.  It's a lot of work.
    Why not let PL/SQL do the things that only PL/SQL can do, and let SQL*Plus do the things it does well?  Have your procedure  or function return a cursor, which you can then diplay in SQL*Plus, or write a piplined function, that you can use in queries where SQL*Plus can format the results.
    The query you posted can eaisly be done directly from SQL*Plus, of course.  I assume you posted a very simple example, becuase your question is just about display.  If you don't absolutely need PL/SQL, don't use PL/SQL.  What I said above applies if you really do need PL/SQL.

  • How to Align Query output in vertical grids in Classic Reports

    HI all,
    I have a requirement to display query output in a vertical grid.
    For example, If my query output is :
    SQL, PL/SQL, Forms,Reports, XMLP, APEX etc then output should be displayed in following format:
    1. SQL 2. PL/SQL 3. Forms
    4. Reports 5. XMLP 6. APEX
    Thanks in Advance!!
    Regards,
    Vamsi

    866010 wrote:
    Thanks for the response!!
    SQL: select * from emp
    where 1=1
    and emp = 1 ;
    We want to display emp details from the above query in the following format:
    EMP No : 1 Ename: XXX Manager_Id: 2
    Job: Consultant Sal: 1000 Commission: 5
    We want a break after three columns.Create a custom named column template and base the tabular form report on this: {message:id=10399762}
    Please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "866010".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • How to combine query

    I run a query to extract a sum amount from a Table based on ZIP codes and another column that keeps netspend records for sales. So I run one query for one region and then another for another. Is there a way to combine this sample query into one ?
    I used TOAD for Oracle to write my queries with:
    Basically each query returns two columns, one using the sum function and one using the count function based on the zip codes in and the status code in account_status column.
    How can this be accomplished using sql ?
    Thanks!
    select sum(netspend), count(id_custkey)
    from Table
    where zip in ('98275',98777','12345')
    and
    account_status = ('Current')
    select sum(netspend), count(id_custkey)
    from Table
    where zip in ('03457',23456','34532')
    and
    account_status = ('Current')
    Message was edited by:
    user587191
    Message was edited by:
    user587191

    SQL> with t as (select '98275' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      2             select '98777' zip, 'Current' account_status, 2 id_custkey, 200 netspend from dual union all
      3             select '98777' zip, 'Current' account_status, 3 id_custkey, 300 netspend from dual union all
      4             select '12345' zip, 'Current' account_status, 4 id_custkey, 400 netspend from dual union all
      5             select '03457' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      6             select '23456' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      7             select '34532' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual)
      8  select sum(netspend), count(id_custkey)
      9    from T
    10   where zip in ('98275', '98777', '12345')
    11     and account_status = ('Current');
    SUM(NETSPEND) COUNT(ID_CUSTKEY)
             1000                 4
    SQL> with t as (select '98275' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      2             select '98777' zip, 'Current' account_status, 2 id_custkey, 200 netspend from dual union all
      3             select '98777' zip, 'Current' account_status, 3 id_custkey, 300 netspend from dual union all
      4             select '12345' zip, 'Current' account_status, 4 id_custkey, 400 netspend from dual union all
      5             select '03457' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      6             select '23456' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      7             select '34532' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual)
      8  select sum(netspend), count(id_custkey)
      9    from T
    10   where zip in ('03457', '23456', '34532')
    11     and account_status = ('Current');
    SUM(NETSPEND) COUNT(ID_CUSTKEY)
              300                 3
    SQL> with t as (select '98275' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      2             select '98777' zip, 'Current' account_status, 2 id_custkey, 200 netspend from dual union all
      3             select '98777' zip, 'Current' account_status, 3 id_custkey, 300 netspend from dual union all
      4             select '12345' zip, 'Current' account_status, 4 id_custkey, 400 netspend from dual union all
      5             select '03457' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      6             select '23456' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual union all
      7             select '34532' zip, 'Current' account_status, 1 id_custkey, 100 netspend from dual)
      8  select sum(netspend), count(id_custkey)
      9  from t
    10  group by (case when zip in ('98275','98777','12345') and account_status = ('Current') then 1
    11                 when  zip in ('03457','23456','34532') and account_status = ('Current') then 2
    12                 else 3
    13                 end)
    14  /
    SUM(NETSPEND) COUNT(ID_CUSTKEY)
             1000                 4
              300                 3
    SQL>

  • How to get query output in javascript

    i have a transaction with one output parameter.
    i have created an xacute query and referenced the transaction and its output parameter.
    now how do i get the value of that output parameter in a script in irpt file.
    i tried creating an applet.
    <APPLET NAME="executeApplet" CODEBASE="/XMII/Classes" CODE="iBrowser" ARCHIVE="illum8.zip" WIDTH="100" HEIGHT="100" MAYSCRIPT>
    <PARAM NAME = "QueryTemplate" VALUE="RH_DASHBOARD/Execute">
    </APPLET>
    i tried with this code in the script
    document.executeApplet.getQueryObject().getOutputParameter()
    but this gave  me the output parameter name not the value.
    i just need the value of the output parameter in the java script.

    Hi Rohit,
    Try using getBrowserObject().getSelectedItemAt(1).  Or you can use any of several other methods to get the value of your output.  If you are in 12.1 or greater, go to the workbench and open your webpage.  At the bottom of the window with the html and javascript, you will see an elipse of 5 dots.  Click and hold to drag that line up.  That will expose the script assistant when you can browse for the other methods available.
    Regards,
    Mike

  • How to combine Digital Output, a delay and Analog Input in a fast loop

    I need to develop a process loop that runs at least at 250 Hz that performs a Digital output, than a delay of 50 microseconds and than an analog input of all the channels. All will be done using ATI MIO 64E3 card. Of course, the acquired data will be processed, displayed and saved. The loop will be running for several minutes until user stops it.

    The fastest and most precise timing will occur if you use hardware timing. You can apply hardware timing to analog input on the E Series boards, but not the digital lines. Let's focus on the analog input first. Continuous waveform scanning uses a scan clock, which can be the board's internal one or an external one which you apply. If you want to scan all the channels 50 microseconds after a digital rising edge, then you need an external signal to signify that scan clock.
    The E Series boards also have 2 counter/timers onboard that you can use for this purpose. You can set up a retriggerable pulse generation operation, where the counter receives a trigger and then on the user specifications, produces a pulse. You can have that route to the analog input scan clock.
    The trigger signal for the counter is that digital pulse. As I mentioned earlier, there is no hardware timing for the digital lines on an E Series board. We do have other digital boards (653x family) that have hardware timed operations if precision is important. If you are satisfied with software's resolution (in the milliseconds), then you can call the E Series board digital function in a loop with a software timer. That digital line can route to the counter to act as the trigger.
    So, on the programming side, you can have three separate and independent operations in parallel. One is for the digital function to output on that line every so often. Another is for the counter set at the retriggerable pulse generation. The last is for the analog input. I will describe this in terms of LabVIEW, but it can be done in a similar fashion with the NI-DAQ function calls or Measurement Studio.
    The digital examples are in the LabVIEW >> Examples >> Daq >> Digital >> E-Series directory. The Generate Retriggerable Pulse example is in the LabVIEW >> Examples >> Daq >> Counters >> DAQ-STC directory. The E Series boards use the DAQ-STC timing chip.
    Go to the LabVIEW >> Examples >> Daq >> anlogin >> strmdisk.llb directory and start with the Cont Acq to Spreadsheet File. This shows how to continuously acquire data and stream it to disk while displaying the data on a chart. Streaming to disk is the efficient way to save data while you are acquiring, as it eliminates the overhead of always opening and closing the file through the iterations of the loop. This saves to a file that can be opened by other applications (Excel, Word, etc.), but it is not as fast as writing to a binary file, which must be opened and read back through LabVIEW. However, for your ~250 Hz rate, it should be fine. Then, go to the LabVIEW >> Examples >> Daq >> anlogin >> anlogin.llb and look at the Acquire N Scans -ExtScanClk example. This shows how to apply the scan clock. Here, the AI Start that you saw in the previous example is replaced by 4 VIs (3 AI Clock Config's and the AI Control). Make those changes to the first example and then add a constant 0 to the AI Control parameter for total scans to acquire. That specifies the continuous operation. The File >> VI Properties >> Documentation menu item of the example describes the physical connections.
    If you aren't using LabVIEW, use the NI-DAQ User Manual and the NI-DAQ Help file installed on your machine. You can look at your AT E Series User Manual at the http://www.ni.com/manuals pages for more information on the hardware. Also, if you want to route those signals internally on the board, you can find some entries in the KnowledgeBase at the http://www.ni.com/support pages.
    Regards,
    Geneva L.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

  • Query output transfer to excel file

    hi all,
    how can i query output transfer to excel file ? i am not using any tool. please suggest me. is there any method that i transfer that output to excel file?

    You can create a csv file. See dump_csv function from Tom Kyte.

  • Central Management server - executed a query but how to send the query output in the form of mail?

    Hi All,
    i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
    basically query is checking the rows count from couple of user tables in servers.
    issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
    could you please suggest how can i achieve this?

    Copy to what?
    SELECT COUNT(*) FROM sys.objects
    Running the above statement returns two columns (server name and count)
    All the servers SS2005  and onwards , then use
    EXEC msdb.dbo.sp_send_dbmail 
         @profile_name = 'name', 
         @recipients = '[email protected]', 
         @query = 'SELECT COUNT(*) FROM sys.objects', 
         @subject = 'Count rows'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to get the Query output to Excel

    Hi ,
    Can you tell me how to get the Query output to excel with out using any third party tool?
    Can you tell me how to write the code in Webservice and call it..
    Please explain it Elaboartly..
    Thanks in Advance!!!
    Mini

    whats your source system?
    you can use Live office, or query as a webservice if you are getting data from universe
    if you're getting data from SAP BI query and you have a java stack on your netweaver then you can get the data directly using sap bi connector in xcelsius.
    good luck

  • How to replace # or Not assigned with blank in BEx Query Output.

    Hi,
    While running the query through BEx Query desginer or Anlayser, I am getting # or Not assigned where there are no values.
    The requirement is to "Replace # or Not assigned with a blank" in the output.
    I want to know, is there any setting in BEx query desginer where we can do this. How to do this.
    Please share your inputs on this. Any inputs on this would be appreciated.
    Thanks,
    Naveen

    Check out SDN-thread: "Re: Remove 'Not assigned'" for more details
    Ideas from SDN research:
    "a solution i have used is to put each RKF column in a CKF colum then in each CKF use RKF + 0, the outcome is that your # should now be 0s, in the query properties you can set the option to display 0s as blank."
    "try to enter a text for the blank entry in the master data maintenance of the relevant objects and set the display option for the objects to 'text'."
    Threads:
    SDN: How to replace # or Not assigned with blank in BEx Query Output.
    SDN: Re: Remove 'Not assigned
    SDN: How to replace # or (Not assigned) with blank in BEx Query Output.
    SDN: Bex Analyzer : Text element system's table ?  
    SDN: change message in web application designer ["nonavailable" ->  136 of SAPLRRSV]
    SDN: Not Assigned ["Not Assigned -> 027 of SAPLRRSV]
    SDN: replacing '#'-sign for 'not assigned' in queries
    SDN: # in report when null in the cube
    SDN: How to replace '#' with blank when there is no value for a date field
    Edited by: Thomas Köpp on Sep 13, 2010 5:20 PM

  • How to combine this query so that i can display the ouput together

    I have no idea how to combine this query together.Someone please help.I want the ouput to display oni 1 result combining all together.
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('6910','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('6912','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('7344','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in ('8344','7976') AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    Edited by: 965547 on Nov 5, 2012 12:55 AM

    The only difference which i am seeing in your queries is the Operation ('6910', '6912','7344','8344')
    Then why don't you put all values in One like this
    Select facility, route, operation, script_id
    from F_ROUTEOPER
    where facility = 'A01' and operation in *('6910', '6912','7344','8344','7976')* AND src_erase_date is null
    and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
    AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
    Hope this will resolve your problem.
    Oracle-911

  • How to display header title for 0MATERIAL texts in the query output?

    Dear Bwers,
    I have a requirement where i need to display headers titles for 0MATERIAL texts in the query output. (example "Material description"). Any ideas on how to do this?
    Thanks
    Raj

    Kamal,
    Its is as below:
    <b>Vendor</b>    <b>Vendor Name</b>
    1001 ---            Bright Industries
    1002 ---            Glow Industries
    I want to display the header title "Vendor Name" as the  title in the column instead of displaying the text without any header title.
    Thanks
    Raj
    Message was edited by:
            Raj Singh
    Message was edited by:
            Raj Singh

  • How to replace # in the query output ?

    Hi experts,
    In the query output and for a particular field in a record if there is no value then it is displaying as '#'.
    Can  we replace '#' with any text or with any other value ?
    Regards,
    Nishuv V.

    hello,
    if you display the characteristics as Key u will get as '#'.
    You can select as Text,then it will show 'Not Assigned'.
    Further, check on these threads:
    How to replace '#' with blank when there is no value for a date field
    Re: How to replace display attribute Value '0', instead of '#' in the query
    Reg,
    Dhanya

  • How to get this output using sql query?

    Hi,
      How to get this output using sql query?
    Sno Name Age ADD Result
    1 Anil 23 delhi Pass
    2 Shruti 25 bangalor Pass
    3 Arun 21 delhi fail
    4 Sonu 23 pune Pass
    5 Roji 26 hydrabad fail
    6 Anil 28 delhi pass
    Output
    Sno Name Age ADD Result
    1 Anil 23 delhi pass
    28 delhi pass

    Hi Vamshi,
    Your query is not pretty clear.
    write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
    Regards,
    Kannan

Maybe you are looking for