Procedure to Return XML

Hello all,
What I'm trying to do is generate XML formatted data given some parameters (prompt values from an APEX page). I have a couple of the prompts and the procedure is working fine - returning the XML as it should.
I'm using the procedure and package found here, http://www.adobe.com/devnet/flex/articles/flex_epg.html
However, I would like to have the XML returned in a different format.
Currently, it's shown as...
<x>
<xx>
<xxx>Value</xxx>
<xxxx>Another Value</xxxx>
</xx>
</x>
What I would like to have is
<x>
<xx="Value" xxx="Another Value" xxxx="Value Here" />
</x>
Any help is appreciated.
-Chris

Sven,
Well, I'm looking to have this XML consumed by Flashmaps and it seems that's the format it likes.
I wanted to use the XMLELEMENT (as shown in example 16-4 here, http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb13gen.htm#i1029583), however, I am not sure how to use it in a procedure.
-Chris

Similar Messages

  • Writing a Procedure to return back XML. Please help.

    Hello,
    I am writing a procedure in Oracle 10G,that will return back an XML
    to me.
    I am passing 2 parameters to this procedure (a Quantity and a Price) and these parameters are element values of the XML that will be returned.
    My Query is :
    1) How can the arguments being passed to the procedure become element values.
    2) Is my procedure to return back the XML correct.? Please can someone modify this procedure?
    Please can someone help me with this procedure as this is a PROD issue.
    Help really appreciated.
    PROCEDURE getTradeXML(qty IN VARCHAR2,price IN VARCHAR2 xml IN OUT CLOB)
    IS
    xml CLOB;
    BEGIN
    xml  = 'SELECT XMLELEMENT("Trade", XMLELEMENT("Quantity",qty),
                                        XMLELEMENT("Price", price))
              FROM DUAL'
    END;

    PROCEDURE getTradeXML(qty IN VARCHAR2,price IN
    VARCHAR2 xml IN OUT CLOB)
    IS
    xml CLOB;
    BEGIN
    xml  = 'SELECT XMLELEMENT("Trade",
    XMLELEMENT("Quantity",qty),
    MLELEMENT("Price", price))
    FROM DUAL'maybe you want
    SELECT XMLELEMENT("Trade", XMLELEMENT("Quantity",qty), XMLELEMENT("Price", price)) into xml FROM DUAL;
    /*not tested*/

  • PL/SQL procedure to process XML file

    I am just starting to work on xml, and we are using PL/SQL stored procedures to process xml file. I did find the sample code in the package (family.sql). This sample print out all element names and attributes. My questions are :
    (1) I tried to modify the code to print out the element values (or Node values). Here is the code:
    -- get all elements and values
    nl := xmlparser.getElementsByTagName(doc, '*');
    len := xmlparser.getLength(nl);
    -- loop through elements
    for i in 0..len-1 loop
    n := xmlparser.item(nl, i);
    dbms_output.put_line('NodeName: ' &#0124; &#0124; xmlparser.getNodeName(n) &#0124; &#0124; ' ');
    dbms_output.put_line('NodeValue: ' &#0124; &#0124; xmlparser.getNodeValue(n) &#0124; &#0124; ' ');
    end loop;
    However, it did not print out the values, although it did print out the name. what's wrong with it? how can I get the value?
    (2) I have the following xml file:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile>
    <subid>1</subid>
    <subname>group1</subname>
    <subdesc>group profile</subdesc>
    </subprofile>
    </profile>
    now, I'd like to print out all the children of the <subprofile> node, that is <subid>, <subname> and <subdesc>. Here is my code:
    -- get subprofile nodelist
    qnlist := xmlparser.getElementsByTagName(doc, 'subprofile');
    -- get length of the nodelist
    len := xmlparser.getLength(qnlist);
    -- loop through elements
    for i in 0..len-1 loop
    qnode := xmlparser.item(qnlist, i);
    qnnode := xmlparser.getFirstChild(qnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    LOOP
    if (xmlparser.isNULL(xmlparser.getNextSibling(qnnode))) then exit;
    END IF;
    qnnode := xmlparser.getNextSibling(qnnode);
    qnchild := xmlparser.getFirstChild(qnnode);
    dbms_output.put_line(xmlparser.getNodeName(qnnode));
    dbms_output.put_line(xmlparser.getNodeValue(qnchild));
    END LOOP;
    end loop;
    when I execute the procedure, I get the following output:
    #text
    I am not sure what's wrong with it. Basically, I didn't know the procedure to traverse the tree since here it's a little different from OO programming. Could someone give a sample code which demonstrate the procedure which can get a specific element's name and values? (for my exapmle, the name and value of the <subname>, or <subid>, <subdesc>).
    Also, is there a way to insert a part of xml file into a DB table? in my case, insert the subprofile into a table. I know the xmlgen package has a procedure to insert a xml file into a table, but not a part of xml. And can I insert a xml file into several tables instead of one table, using xmlgen package?
    looking forward to hearing from you. any suggestion and sample code would be helpful. thank you very much.
    null

    I sloved my first question: to get the Nodevalue, I need to use getFirstChild(n);
    But, I still didn't figure out the second
    problem. Actually, It works when I modified my xml file as following:
    <?xml version="1.0"?>
    <profile>
    <id>1</id>
    <name>Company</name>
    <des>master profile</desc>
    <subprofile><subid>1</subid><subname>group1</subname><subdesc>groupprofile</subdesc></subprofile>
    </profile>
    All the <subprofile>....</subprofile> must be in one line without any return. This is unbelievable! It suppose that xml does not matter new lines. I tested my code, it seems space is fine, but new line. Something must be wrong in my code.
    please give any suggestion. Thanks,
    Yudong
    null

  • Using XI - RFC table and an Oracle stored procedure that returns a cursor.

    I need to create an interface using XI between an RFC table and an Oracle stored procedure that returns a cursor.  We are on oarcle 9.2 and  SP12.
    My stored procedure looks something like this:
    CREATE OR REPLACE
    PROCEDURE testproc_xi2 (p_recordset1 OUT SYS_REFCURSOR,
                                             in_quoteid IN varchar2 )
    AS
    BEGIN
      OPEN p_recordset1 FOR
       SELECT  q.quote_id,
                     q.modified_by,
                     q.quote_status,
                     q.total_cost
                FROM quote q
               WHERE q.quote_id = in_quoteid
                 AND q.total_cost > 0 ; 
    END testproc_xi2 ;
    My RFC has table and  one import parameter .
    I wanted to know how to create the data type for the ref cursor? and also for the table type in the RFC?
    CAN XI handle multi rows coming from a Stored procedure? Are there any other alternative methods if this is not supported?Any pointers to this would be helpful.
    I have called a Oracle SP from an RFC before, but that interface had one input parameter going to the stored procedure from the RFC and about 6 o/p parameters coming from the Stored procedure. This works fine.
    Thanks for the help.
    Mala

    Mala,
    i dont think there is anything called an rfc table...RFC stands for remote function call. That in essence would imply you need a rfc to jdbc connection.
    yes XI can handle multiple rows cooming from the the stored procedure if you have them mapped appropriately.
    Now as to how to create the data type within xi , you need to know what fields are going to be returned and whether they are nested and then just create them as you would for an xml
    for ex
    <Details>
      <FirstName>
    <LastName>
    </Details>
    that in xi would be smthing like
    Details  type of data occurence
    FirstName type of data occurence
    LastName type of data occurence.
    Hope that helps.
    If it does dont forget the points..:-)

  • Calling StroreProcedure contain XML as Input and store proce return XML as out-BizTalk

    I have a requirement in BizTalk that
    - I will receive XML from Source and i need to submit this XML data in  SQL storeprocedure  as a parameters and submit data
    Ex: My_SP(myXML xml Input,myXML1 xml OUT)
    Could you please help me how to call storeprocedure and submit XML and how to retrieve XML from SP.

    One of the way is to return xml from stored procedure instead of getting a typed schema
    You can have xml auto defined at stored procedure something like below stored procedure.
    SELECT [Employee_ID] ,[Name] ,[DOJ] ,[Designation] ,[Job_Description] ,cast([Rating] as varchar(100)) as Rating ,[Salary] ,[Last_Modified] ,[Status] ,[Address]
    FROM [Adapt_Doc].[dbo].[Employee] for xml auto, xmlschema
    After that you can directly assign the message to the typed schema something like below
    MessageTypedSQL=MessageUntypedSQl;
    For reference you can look into below MSDN articles
    SQL and XML: Use XML to Invoke and Return Stored Procedures
    Executing Stored Procedures Having a FOR XML Clause
    Thanks
    Abhishek

  • The simplest way for plsql procedure to return multiple rows

    Hi,
    What is the simplest way for plsql procedure to return multiple rows (records). There are many combination of ways to do it but I am looking for a solution that is appropriate for plsql beginners. Many solutions use cursors, cursor variables, collections and more that kind of things that are complex on the face of it. Is it somehow possible to achieve the same with less effort?
    Sample query would be: SELECT * FROM EMPLOYEES;
    I want to use returned rows in APEX to compose APEX SQL(in that context plsql) report.
    It is enough to use just SELECT * FROM EMPLOYEES query in APEX but I want to use plsql procedure for that.
    Thank you!

    Hi,
    It depends :-).
    With +...that is appropriate for plsql beginners...+ in mind... it still depends!
    The list of techniques (ref cursors, cursor variables, collections, arrays, using explict SQL) you have referenced in your post can be made to work. but...
    +Is it somehow possible to achieve the same with less effort?+ Less effort : That needs to be defined (measured). Especially in the context of pl/sql beginners (who is a beginner?) .
    What is the level of "programming experience" ?
    What is the level of understanding of "Relational Result set" as processible in Oracle?
    If you are looking for
    Process_the_set_of rows_in APEX () kind of capabilitywhich "abstracts/hides" relation database from developers when working on relation database, it may not be the best approach (at least strategically). Because I believe it already is abstracted enough.
    I find REF CUROSOR most effective for such use, when the "begginer" has basic understanding of processing SQL result set .
    So in a nut shell, the techniques (that you already are familiar with) are the tools available. I am not aware of any alternative tools (in pure Oracle) that will simplify / hide basics from develpers.
    vr,
    Sudhakar B.

  • How to test a procedure which returns a recordset from pl/sql

    hello,
    Is it possible to test a procedure which returns a recordset from pl/sql?
    Everything I try results in errors like PLS-00382: expression is of wrong type, when I try to open the result cursor
    or PLS-00221: tc is not a procedure or is undefined.
    I created the following procedure:
    CREATE OR REPLACE PACKAGE test AS
    TYPE cursorType is REF CURSOR;
    PROCEDURE test_cursor( tc IN OUT cursorType,
    v_err OUT varchar2,
    v_msg OUT varchar2);
    END;
    CREATE OR REPLACE
    PACKAGE BODY test AS
    PROCEDURE test_cursor
    (tc IN OUT cursorType,
    v_err OUT varchar2,
    v_msg OUT varchar2)
    AS
    BEGIN
    open tc for
    SELECT '1' "number" FROM dual
    union
    select '2' "number" from dual;
    v_msg := 'no errors';
    v_err := 0;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    v_msg := 'no data found';
    v_err := SQLCODE;
    WHEN OTHERS
    THEN
    v_msg := SQLERRM;
    v_err := SQLCODE;
    END;
    END;
    I try to get the output from pl/sql with something like this:
    DECLARE
    TC PROVGRON.TEST.cursorType;
    V_ERR VARCHAR2(200);
    V_MSG VARCHAR2(200);
    BEGIN
    V_ERR := NULL;
    V_MSG := NULL;
    PROVGRON.TEST.TEST_CURSOR ( TC, V_ERR, V_MSG );
    DBMS_OUTPUT.Put_Line('V_ERR = ' || V_ERR);
    DBMS_OUTPUT.Put_Line('V_MSG = ' || V_MSG);
    -- in tc I was hoping to hava a cursor??
    FOR i IN tc
    LOOP
    DBMS_OUTPUT.PUT_LINE (i.number);
    END LOOP;
    END;
    Without the for loop (or open tc) the pl/sql will output:
    V_ERR = 0
    V_MSG = no errors
    PL/SQL procedure successfully completed.
    With anything I try with the cursor I get errors?
    What am I doing wrong?

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch5.htm#sthref1122

  • Calling stored procedure and returning multiple resultsets

    Hello,
    Is it possible to create a procedure that return multiple result sets?
    e.g.
    procedure GetDataFromTables() is
    begin
    select * from table_one;
    select * from table_two;
    end GetDataFromTables;
    And I want to call this procedure that returns multiple resultsets (one for table_one and another for table_two)
    I have referred to the OCCI sample occiproc.cpp, but I am not sure how to handle multiple resultsets.
    Your help is highly appreciated.

    Thank You,
    Got the REF cursor in storedproc.cpp.
    But as it is documented, getCursor() gets the REF CURSOR value of an OUT parameter as a ResultSet.
    So, is it true that if I have to write a procedure that selects * from 50 tables (50 SQL statements) , I have to set 50 OUT parameters to get the result sets.?
    Is there any better way of doing this?
    e.g. in DB2, we can open multiple cursors in the procedure body and then get the result set one after another.
    CREATE PROCEDURE get_staging_data ()
    RESULT SETS 1 <no. of result sets>
    LANGUAGE SQL
    BEGIN ATOMIC
    DECLARE L_SQL varchar(5000);
    DECLARE c CURSOR WITH RETURN TO CLIENT FOR L_STMT;
    SET L_SQL = '';
    SET L_SQL = 'SELECT * FROM ';
    SET L_SQL = L_SQL || IN_Tab_Name ;
    SET L_SQL = L_SQL || ' WHERE VERIFY_FLAG=''S'' FOR READ ONLY OPTIMIZE FOR 2000 ROWS' ;
    PREPARE L_STMT FROM L_SQL;
    OPEN c; < can open multiple cursors in the prodedure body>
    END

  • Returning XML String From Servlet

              Is there a simple way to disable the HTML character escaping when returning
              a string from a servlet. The returned string contains well formed XML, and
              I don't want the tags converted to > and < meta characters in the
              HTTP reply.
              The code is basically "hello world", version 7.0 SP2.
              Thanks
              > package xxx.servlet;
              >
              > import weblogic.jws.control.JwsContext;
              >
              >
              > /**
              > * @jws:protocol http-xml="true" form-get="false" form-post="false"
              > */
              > public class HelloWorld
              > {
              > /** @jws:context */
              > JwsContext context;
              >
              > /**
              > * @jws:operation
              > * @jws:protocol http-xml="false" form-post="true" form-get="false" soap-s
              tyle="document"
              > * @jws:return-xml xml-map::
              > * <HelloWorldResponse xmlns="http://www.xxx.com/">
              > * {return}
              > * </HelloWorldResponse>
              >
              > * ::
              > * @jws:parameter-xml xml-map::
              > * <HelloWorld xmlns="http://www.xxx.com/">
              > * <ix>{ix}</ix>
              > * <contents>{contents}</contents>
              > * </HelloWorld>
              >
              > * ::
              > */
              > public String HelloWorld(String s)
              > {
              > return "<a> xyz </a>";
              > }
              > }
              

              Radha,
              We have a client/server package which speaks SOAP over a
              streaming HTTP channel for which we are writing a WebLogic
              servlet. For reasons of efficiency, we want to deserialize
              only the very top-level tags of the messages as they pass
              through the servlet. Yes, in theory, we should probably
              deserialize and validate the entire message contents...
              When we add support for other clients, we will fully
              deserialize inside those servlets.
              I have not looked any further into how to stop the inner
              tags from being escaped yet -- it is an annoyance more than
              a disaster, since the client handle meta escapes.
              My current guess is to use ECMAScript mapping...
              -Tony
              "S.Radha" <[email protected]> wrote:
              >
              >"Tony Hawkins" <[email protected]> wrote:
              >>
              >>Is there a simple way to disable the HTML character escaping when returning
              >>a string from a servlet. The returned string contains well formed XML,
              >>and
              >>I don't want the tags converted to > and < meta characters in the
              >>HTTP reply.
              >>
              >>The code is basically "hello world", version 7.0 SP2.
              >
              >>
              >>Thanks
              >>
              >>> package xxx.servlet;
              >>>
              >>> import weblogic.jws.control.JwsContext;
              >>>
              >>>
              >>> /**
              >>> * @jws:protocol http-xml="true" form-get="false" form-post="false"
              >>> */
              >>> public class HelloWorld
              >>> {
              >>> /** @jws:context */
              >>> JwsContext context;
              >>>
              >>> /**
              >>> * @jws:operation
              >>> * @jws:protocol http-xml="false" form-post="true" form-get="false"
              >>soap-s
              >>tyle="document"
              >>> * @jws:return-xml xml-map::
              >>> * <HelloWorldResponse xmlns="http://www.xxx.com/">
              >>> * {return}
              >>> * </HelloWorldResponse>
              >>>
              >>> * ::
              >>> * @jws:parameter-xml xml-map::
              >>> * <HelloWorld xmlns="http://www.xxx.com/">
              >>> * <ix>{ix}</ix>
              >>> * <contents>{contents}</contents>
              >>> * </HelloWorld>
              >>>
              >>> * ::
              >>> */
              >>> public String HelloWorld(String s)
              >>> {
              >>> return "<a> xyz </a>";
              >>> }
              >>> }
              >>
              >>
              >Hi Tony,
              >
              > Can you let me know for what purpose you want to disable the
              >HTML character
              >escaping.In case if you
              >
              >have tried this using someway,pl. let me know.
              >
              >rgds
              >Radha
              >
              >
              

  • Returning XML Data from a database

    Ok, just got the new DW CS3 and really want to begin using
    the built in Spry capabilitites. All of the examples I've seen for
    populating the datasets with XML data are based on referencing a
    static XML file. I want to query my database and return XML data to
    a Spry Table. How do I accomplish this? I know how to perform the
    query and retrun the data in an XML format (ColdFusion) but I can't
    tell the spry dataset to use this. HELP!!

    Well, that's the trick... I can't point to a testing server
    (i.e. Application interface) because we aren't permitted to have
    the RDS login where I work. (They haven't bothered to configure the
    CF server for restricting access) I have to manually create all
    connections and queries. I'm currenlty using the exact format in
    the example page you provided to return the data in an XML format
    but when I point to that file as my datasource I get nothing
    displayed on the page. The file that performs the query and returns
    the data is in a separate file from the one I'm trying to use the
    Spry table in. When I use this same query file for an Ajax call to,
    say, populate a listbox or pulldown menu it works fine, but I can't
    get it to work with the Spry dataset.

  • How to call pl/sql procedure/function from XML

    Hi,
    I have a requirement to call pl/sql function/procedure from the RTF template. How can I do this?

    Hi,
    I have got the same requirement. We need to call the store PL/SQL procedure from the XML template to generate the fixedwidth files. Could you tell me if you are able to call PL/SQL procedure from XML template?
    Thanks,
    Ram

  • Sort/filter datablock based on procedure that return table type

    Hi All,
    I’ve got datablock based on procedure that return table type. In the form I have to provide ‘filter and sort records’ functionality. Previously, using tables/views based datablocks, I’ve done that by using:
    -- filter
    SET_BLOCK_PROPERTY (L_BLOCK_NAME, DEFAULT_WHERE, L_WHERE_CLAUSE);
    -- sort
    SET_BLOCK_PROPERTY(L_BLOCK_NAME ,ORDER_BY, L_ORDER_BY_CLAUSE);
    -- and then
    EXECUTE_QUERY;
    It doesn’t work with procedure that return table type. How I can do that?
    Bartek

    I agree with Andreas, from the sample you have given us, I don't see any reason why you could not merge these queries into a single UNION/UNION ALL query. Also, I would add your summation query to your main query to eliminate this extra step. The result would look something like:
    SELECT DISTINCT
         pih.id
         ,d.document_id
         ,pih.doc_serial_no
         ,pih.purch_invoice_date
         ,oh.company_name
         ,(SELECT NVL(SUM(amount),0)
              FROM "YOUR TABLE HERE" yth
              WHERE yth."YOUR COLUMN HERE" = pih.id) AS sum_amount
      FROM "YOUR TABLES HERE"
    WHERE "YOUR JOIN CONDITIONS HERE"
    UNION ALL
    SELECT DISTINCT
         sih.id
         ,d.document_ind
         ,sih.doc_serial_no
         ,sih.sales_invoice_date
         ,sih.company_name
         ,(SELECT NVL(SUM(amount),0)
              FROM "YOUR TABLE HERE" yth
              WHERE yth."YOUR COLUMN HERE" = sih.id) AS sum_amount
      FROM "YOUR TABLES HERE"
    WHERE "YOUR JOIN CONDITIONS HERE"
    [/code]
    Hope this helps.
    Craig...
    +If a response is helpful or correct, please mark it accordingly+
    Edited by: CraigB on Feb 23, 2010 1:39 PM
    It appears the CODE tags are not working as well as the URL tags.  :(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calling a stored procedure which returns a value

    Hi Friends,
    I want to call a stored procedure which returns a value.
    Eg
    create or replace procedure xyz(a1 in varchar2, a2 in varchar2, z1 out number)
    thanks

    Hi,
    use this.
    declare
    retval number;
    begin
    abc('aaa','bbb',retval);
    dbms_output.put_line('retval is ' ||retval);
    end;
    --Basava.S                                                                                                                                                                                                                                                                                               

  • Stored procedure that returns a cursor (result set)

    Hi,
    We have a stored procedure that returns a cursor (result set) but when I compliled it and catalouged (introspected) it in the OBPM I got all the primitive type parameters (either IN or OUT) in the proc call except the cursor type (the result set) which is the out param of the stored proc.
    Any pointers please?
    Thanks

    Result set is of RowType and is not supported as a Stored Procedure as far as I know.
    HTH
    Sharma

  • Stored procedure that returns multiple tables

    Hello everyone,
    I was wondering if there's a way to write a stored procedure that returns multiple result set as in sql server. for example, in sql server, you can write 2 select statements and when loading them in c#, u can get two data tables.
    I am not sure having a single ref cursor for each select is the only solution. I might need to return a variable number of tables per procedure call (based on a certain criteria).
    Any ideas?
    thanks for your time

    Sure. Ref cursor is the only easier answer for your problem.
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:01.43
    satyaki>
    satyaki>create or replace procedure ref_gen_arg(choice in int,b in out sys_refcursor)
      2  is  
      3    str   varchar2(500);
      4  begin   
      5    if choice = 1 then      
      6      str := 'select * from emp';   
      7    elsif choice = 2 then      
      8      str := 'select * from dept';   
      9    end if;       
    10   
    11    open b for str;
    12  exception  
    13    when others then     
    14      dbms_output.put_line(sqlerrm);
    15  end;
    16  /
    Procedure created.
    Elapsed: 00:00:04.38
    satyaki>
    satyaki>
    satyaki>declare   
      2    rec_x emp%rowtype;   
      3    rec_y dept%rowtype;       
      4    w sys_refcursor;
      5  begin  
      6    dbms_output.enable(1000000);  
      7    ref_gen_arg(1,w);  
      8    loop    
      9      fetch w into rec_x;     
    10      exit when w%notfound;             
    11        dbms_output.put_line('Employee No: '||rec_x.empno||' - '||                          
    12                             'Name: '||rec_x.ename||' - '||                          
    13                             'Job: '||rec_x.job||' - '||                          
    14                             'Manager: '||rec_x.mgr||' - '||                          
    15                             'Joining Date: '||rec_x.hiredate||' - '||                          
    16                             'Salary: '||rec_x.sal||' - '||                          
    17                             'Commission: '||rec_x.comm||' - '||                          
    18                             'Department No: '||rec_x.deptno);  
    19    end loop;  
    20    close w;    
    21   
    22    ref_gen_arg(2,w);  
    23    loop    
    24      fetch w into rec_y;
    25      exit when w%notfound;            
    26         dbms_output.put_line('Department No: '||rec_y.deptno||' - '||                           
    27                              'Name: '||rec_y.dname||' - '||                           
    28                              'Location: '||rec_y.loc);  
    29    end loop;  
    30    close w;
    31  exception  
    32    when others then    
    33      dbms_output.put_line(sqlerrm);
    34  end;
    35  /
    Employee No: 9999 - Name: SATYAKI - Job: SLS - Manager: 7698 - Joining Date: 02-NOV-08 - Salary: 55000 - Commission: 3455 - Department No: 10
    Employee No: 7777 - Name: SOURAV - Job: SLS - Manager:  - Joining Date: 14-SEP-08 - Salary: 45000 - Commission: 3400 - Department No: 10
    Employee No: 7521 - Name: WARD - Job: SALESMAN - Manager: 7698 - Joining Date: 22-FEB-81 - Salary: 1250 - Commission: 500 - Department No: 30
    Employee No: 7566 - Name: JONES - Job: MANAGER - Manager: 7839 - Joining Date: 02-APR-81 - Salary: 2975 - Commission:  - Department No: 20
    Employee No: 7654 - Name: MARTIN - Job: SALESMAN - Manager: 7698 - Joining Date: 28-SEP-81 - Salary: 1250 - Commission: 1400 - Department No: 30
    Employee No: 7698 - Name: BLAKE - Job: MANAGER - Manager: 7839 - Joining Date: 01-MAY-81 - Salary: 2850 - Commission:  - Department No: 30
    Employee No: 7782 - Name: CLARK - Job: MANAGER - Manager: 7839 - Joining Date: 09-JUN-81 - Salary: 4450 - Commission:  - Department No: 10
    Employee No: 7788 - Name: SCOTT - Job: ANALYST - Manager: 7566 - Joining Date: 19-APR-87 - Salary: 3000 - Commission:  - Department No: 20
    Employee No: 7839 - Name: KING - Job: PRESIDENT - Manager:  - Joining Date: 17-NOV-81 - Salary: 7000 - Commission:  - Department No: 10
    Employee No: 7844 - Name: TURNER - Job: SALESMAN - Manager: 7698 - Joining Date: 08-SEP-81 - Salary: 1500 - Commission: 0 - Department No: 30
    Employee No: 7876 - Name: ADAMS - Job: CLERK - Manager: 7788 - Joining Date: 23-MAY-87 - Salary: 1100 - Commission:  - Department No: 20
    Employee No: 7900 - Name: JAMES - Job: CLERK - Manager: 7698 - Joining Date: 03-DEC-81 - Salary: 950 - Commission:  - Department No: 30
    Employee No: 7902 - Name: FORD - Job: ANALYST - Manager: 7566 - Joining Date: 03-DEC-81 - Salary: 3000 - Commission:  - Department No: 20
    Department No: 10 - Name: ACCOUNTING - Location: NEW YORK
    Department No: 20 - Name: RESEARCH - Location: DALLAS
    Department No: 30 - Name: SALES - Location: CHICAGO
    Department No: 40 - Name: LOGISTICS - Location: CHICAGO
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.73
    satyaki>Regards.
    Satyaki De.

Maybe you are looking for

  • How to create olap cube using Named Query Table in Data source View

     I Create on OLAP Cube using Existing Tables Its Working Fine But When i Use Named Query Table with RelationShip To other Named query Table  It Not Working .So give me some deep Clarification On Olap Cube for Better Understanding Thanks

  • How to get all the column values from a table source

    Hi, I have created one table source on a employee table and some customized attributes using global settings>search attributes. Now these customized attributes mapped with the table columns through attribute mapping from the sorce tab. Using doOracle

  • Problem with lastModified of a file

    hello eb i want to have the date of the last modification of a file for some file i getthe correct answer and for other i have "Thu Jan 01 01:00:00 GMT 1970" i think that it is the bigining of the counting for the date but i dont knox why if so can h

  • Using variables in IP

    Hi, I would like to use some variables adminstrated by a user in IP. For example, we want the central user to select the fiscal year for the Integrated application. The only solution we found is to create a specific table where the user enters a fisc

  • Compressor 1.2.1 with QT 7.0.3 - Issues?  Help!

    I am trying to export from FCP 4.5 HD (OS 10.3.9) using Compressor 1.2.1 and EVERY TIME when Compressor is through and I play the compressed clip the audio starts out fine but over the course of the clip (25 Minutes or so) the audio gets behind. I ha