How do i pass recordsets across procedures

Hi,
I wanted to know how to pass a record set from one procedure to another procedure using a table of a used defined type and how do i access the values from the recordset for any manipulation within the procedure..
For eg i have a table/Ref cursor on a user defined type which has two columns empno,deptno... as a out parameter from a procedure... How do i take this in in a different procedure and access the values..
Thanks
Kiran

Hello,
Thanks for posting to the NI Discussion Forums.  The channel name attribute is one of the
custom waveform attributes added by the DAQ driver software.  In addition to these items added by DAQ, it seems
as though any custom attribute added to the waveform is not sent with
the shared variable.  I have sent notice
to R&D to take a look at this problem (issue 3VQEIA3A), but I do not have
any sort of timeline on when/what will come of this.  For now, it looks like you will have to send
any data about the waveform over to the Windows client machine separately.  For example, you could create a new variable
of 2-D string data where you would populate the array with <key,value>
pairs of the waveform data you are concerned with.  If you were interested in how to extract the channel
name from the waveform, or any of the other properties set by the DAQ software
check out the “details” in the context help for the “set waveform attribute”
VI.
Hope this helps!
Travis M
LabVIEW R&D
National Instruments
Attachments:
waveformattributes.zip ‏36 KB

Similar Messages

  • How i will pass table within procedure

    how i will pass table within procedure and call another procedure.
    can anybody give some example

    You are not specific at all. Do you mean you want to pass table_name as parameter to a procedure? Do you want to pass tables_name dynamically while the procedure is running? If so, use dynamic sql. You can directly call another procedure within a procedure.
    create or replace procedure sample_proc
    as
    v_table_name varchar2(10);
    begin
       select table_name into v_table_name
       from user_tables
       where table_name = 'EMP';
       procedure_2(v_table_name);
    end;And the procedure_2 would be
    create or replace procedure procedure_2(p_table_name varchar2)
    as
    begin
       execute immediate 'DROP TABLE '||p_table_name;
    end;For God's sake please completely describe what you want, otherwise we don't know what on Earth you want!
    Cheers
    Sarma.

  • How can I pass objects across neywork?

    How can I pass a ObjectOutputStream to a ObjectInputStream, across a socket?
    Thanks in advance for your posts!

    Or maybe I am misunderstanding your question?-Probably
    Lets see: ObjectOutputStream passes data trought aout
    Stream; ObjectInputStream receives data trought a in
    Stream: so, I suppose that they can use as streamsthe
    connections betwen two sockets, in one point the
    ObjectOutputStream sending, an in another the
    ObjectInputStream receiving.Yes. The sockets provide the connections, and you can
    call getInputStream or getOutputStream on the sockets
    to read what the other guy is sending, or to write to
    the other guy. You don't actually pass the sockets or
    streams back and forth--they're just the channels by
    which you pass your data.I knew that, thanks anyway. But my question is how can I pass objects throught that streams.
    Anyone knows?
    Thanks

  • How can I pass Recordsets as input parameter to a Function ?

    Hi Gurus,
    I want to create a function that receive recordsets as input parameter also returns recordsets as output.
    I have a requirement to do stock taking for all order items of one Order number in one single query execution (to avoid row by row basis).
    From the post in the forum I know that a function can return recordsets / query result using REF CURSOR or pipelined table function.
    My question is : how to pass the recordsets as input parameter to that function ?
    (because I could have 75 rows item in one order number)
    Below is the DDL and the query :
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    insert into stocks values('P001', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P001', 'WH002', '01-dec-2006', 50)
    insert into stocks values('P001', 'WH002', '01-jan-2007', 50 )
    insert into stocks values('P001', 'WH001', '01-Mar-2007', 150)
    insert into stocks values('P002', 'WH003', '01-dec-2006', 25)
    insert into stocks values('P002', 'WH003', '15-Jan-2007', 50)
    insert into stocks values('P002', 'WH003', '01-Mar-2007', 75)
    insert into stocks values('P003', 'WH001', '01-dec-2006', 30)
    insert into stocks values('P003', 'WH002', '15-Jan-2007', 40)
    insert into stocks values('P003', 'WH003', '01-Mar-2007', 50)
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    The query for stock taking :
    select product,warehouse,expireddate, least(qty_available-(sm - qty_ord),qty_available) qty
    from ( select product,warehouse,expireddate,qty_available,qty_ord, sum(qty_available) over(partition by product order by s.product,expireddate,decode(warehouse,priority_wh,0,1),warehouse ) sm
    from stocks s,order_detail o
    where s.product = o.product_ord order by s.product,expireddate,decode(warehouse,priority_wh,0,1) )
    where (sm - qty_ord) < qty_available

    Hi,
    This my requirement :
    I have (simplified)Order_Detail as below :
    CREATE TABLE Order_Detail (PRODUCT_ORD CHAR(4), QTY_ORD number, Priority_WH CHAR(5) )
    INSERT INTO Order_Detail VALUES ('P001', 75, 'WH003') // previously 'WH002'
    INSERT INTO Order_Detail VALUES ('P002', 45, 'WH002')
    INSERT INTO Order_Detail VALUES ('P003', 55, NULL)
    Then I want to do stock taking from my STOCK table (described on my first post on this thread)
    create table stocks (Product char(4), Warehouse char(5), expireddate date, qty_available number)
    The rule is : The stok taking is on First In First Out basis, on expireddate.
    And I want to do it in single query.
    I want to make this a Function / Stored Procedure so that other transaction can also make use of this query.
    That is why I need to pass the 3 rows oy mr Order_Detail above, do the query, and return the result.
    Then INSERT the result into ORDER_DETAIL_PER_EXPIRED_DATE table.
    I hope this clear my requirement, is this possible ?
    Thank you,
    xtanto

  • How do I pass the exact datetime parameter in a procedure.

    How do I pass the exact datetime parameter in a procedure.
    Hi All,
    I have a datetime problem which is driving me crazy.
    I need pass a datetime field as a parameter in an oracle procedure exactly as below with timestamp.
    Example: '6/01/2005 5:25:24 AM'
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get an error “INVALID MONTH”
    Next Changed to_date to to_char
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_char('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get a different error, “INVALID NUMBER”
    Next pass the datetime as it is.
    SQL > exec myprod(‘value1’,’value2’,’value3’, '6/01/2005 5:25:24 AM');
    I get an error “INVALID MONTH”
    Here is the my procedure.
    CREATE OR REPLACE PROCEDURE myprod (
    p_value1 varchar2,
    p_value2 varchar2,
    p_value3 varchar2 ,
    p_value4 date )
    IS
    filehandler UTL_FILE.FILE_TYPE;
    va_currentdate DATE;
    BEGIN
    SELECT sysdate
         INTO va_currentdate
    FROM dual;
    END;
    Do you know any solutions for this problem.
    Thanks

    What is your NLS_DATE_FORMAT value?
    There seem to be some implicit data conversions in your arguments.
    SQL> select parameter,value from nls_session_parameters where parameter like '%DATE%';
    PARAMETER                                                    VALUE
    NLS_DATE_FORMAT                                              YYYY-MM-DD HH24:MI:SS
    NLS_DATE_LANGUAGE                                            AMERICAN
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual;
    select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual
    ERROR at line 1:
    ORA-01830: date format picture ends before converting entire input string
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh:mi:ss am') from dual;
    TO_DATE('6/01/20055
    2005-01-06 05:25:24

  • How can i pass the  parameter for strored procedure from java

    dear all,
    I am very new for stored procedure
    1. I want to write the strored procedure for insert.
    2. How can i pass the parameter for that procedure from java.
    if any material available in internet create procedure and call procedure from java , and passing parameter to procedure from java

    Hi Ram,
    To call the callable statement use the below sample.
    stmt = conn.prepareCall("{call <procedure name>(?,?)}");
    stmt.setString(1,value);//Input parameter
    stmt.registerOutParameter(2,Types.BIGINT);//Output parameter
    stmt.execute();
    seq = (int)stmt.getLong(2);//Getting the result from the procedure.

  • How can i pass second text  value to the procedure.

    Hi ,
    I have used APEX_ITEM.TEXT(1,null) Item_name,APEX_ITEM.TEXT(2,null) file_name in a sql query and i should pass these two text value as a input parameter to the Procedure.
    So in Process i have written code like
    FOR i IN 1 .. APEX_Application.g_f01.COUNT
    LOOP
    generate_report_data(APEX_Application.g_f01(i)
    ,APEX_Application.g_f02(i)
    END LOOP;
    COMMIT;
    if i enter values in two text columns then two values are passing to a procedure it's fine.
    Here the issue is if i leave the first value as balnk and enter the 2 nd value like Xyz then click on a submit button
    so 2 nd value also passing null to the procedure..
    please anybody guide on this issue..
    Thanks in advance..
    Regards
    Narender B

    Hello Narender,
    >
    Here the issue is if i leave the first value as balnk and enter the 2 nd value like Xyz then click on a submit button
    so 2 nd value also passing null to the procedure..
    >
    This is happening because of FOR i IN 1 .. APEX_Application.g_f01.COUNT in your procedure:
    >
    FOR i IN 1 .. APEX_Application.g_f01.COUNT
    LOOP
    generate_report_data(APEX_Application.g_f01(i)
    ,APEX_Application.g_f02(i)
    END LOOP;
    COMMIT;
    >
    FOR i IN 1 .. APEX_Application.g_f01.COUNT this loop will take only those values of apex_application.g_f01 into consideration whose value is not null.
    Hope it helps!
    Regards,
    Kiran

  • Passing date to procedure help

    Hello, this maybe simple question, but I couldn't figure out why I am getting
    ORA-01843: not a valid month.. Here is what I did:
    exec proc(to_date('01/01/2007','MM/DD/YYYY'),to_date(01/30/2007,'MM/DD/YYYY'))NLS setting is: DD-MON-RR
    procedure proc (date1 in date, date2 in date)
    v_date_period varchar2;
    select date_period into v_date_period from t1 where start_date = to_date(date1,'MM/DD/YYYY') and end_date = to_date(date2,'MM/DD/YYYY');
    start_date and end_date are in date MM/DD/YYYY format in the table, but the above code is failed b/c of the above error.
    One thing I noticed that when dates are passed into the procedure, they come in DD-MON-RR format and the comparion never works in cursor. start_date and end_date are in MM/DD/YYYY format. but it works only when to_date(date1,'DD-MON-RR') and to_date(date2,'DD-MON-RR'). How is it working when start_date and end_date are in MM/DD/YYYY format???
    another question is, when I say To_date, does it always convert any date to NLS setting? I used
    to_date('01/01/2007', 'dd/mm/yyyy'), but it doesn't have any effect when it goes to the procedure.. still comes as DD-MON-RR.
    what mistake i am doing? I would appreciate your ans. Thanks,

    I think I got it now. I really didn't need that extra
    conversion within the procedure. It works now. Then let's make sure it's clear for you.
    You are right to consider the NLS_DATE_FORMAT settings, that's good, as most people are unaware of it and really have no understanding whatsoever as to what it does. Perhaps your understanding of it is not quite up to scratch just yet...
    The setting relates to how oracle converts between dates and strings when no format is specified explicitly. e.g.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYSDATE)
    04/03/2008 10:00:11
    SQL> alter session set nls_date_format = 'YYYY MON DD';
    Session altered.
    SQL> select to_char(sysdate) from dual;
    TO_CHAR(SYS
    2008 MAR 04
    SQL> select to_char(sysdate, 'DD/MM/YYYY') from dual;
    TO_CHAR(SY
    04/03/2008
    SQL>Likewise if you convert the other way from a string to a date...
    Firstly with implicit conversion, which will assume the NLS_DATE_FORMAT setting format for the string...
    SQL> select to_date('2008 JAN 01') from dual;
    TO_DATE('20
    2008 JAN 01And then if you explicitly convert specifying the format...
    SQL> select to_date('01/01/2008','DD/MM/YYYY') from dual;
    TO_DATE('01
    2008 JAN 01However if you try and implicitly convert (using the NLS setting) but the string isn't of the correct format...
    SQL> select to_date('01/01/2008') from dual;
    select to_date('01/01/2008') from dual
    ERROR at line 1:
    ORA-01843: not a valid month
    SQL>So now let's look at what you were doing...
    select date_period into v_date_period
    from t1
    where start_date = to_date(date1,'MM/DD/YYYY')
    and end_date = to_date(date2,'MM/DD/YYYY');Your date1 and date2 are already of a DATE datatype. This means that they are already stored in the oracle internal date format. Note: ALL dates are stored the same internally regardless of how they are displayed. e.g.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    04/03/2008 10:35:20
    Typ=13 Len=8: 216,7,3,4,10,35,20,0
    SQL> alter session set nls_date_format = 'YYYY MON DD HH24:MI'
      2  ;
    Session altered.
    SQL> select sysdate, dump(sysdate) from dual;
    SYSDATE
    DUMP(SYSDATE)
    2008 MAR 04 10:36
    Typ=13 Len=8: 216,7,3,4,10,36,50,0
    SQL>However, you are using the to_date function. This expects the first parameter to be a string and the second parameter is an optional string specifying the format of the first string.
    So it was expecting:
    to_date(<string>,<string>)and you gave it
    to_date(<date>,<string>)When oracle comes across this sort of thing, rather than produce an error it recognises that it is able to do an implicit conversion of datatypes so internally it is doing
    to_date(to_char(<date>),<string>)Note: because it is an implicit conversion within the "to_char" it is using the NLS settings to do this.
    You said your NLS setting was DD-MON-RR, so this is the same as...
    to_date(to_char(<date>,'DD-MON-RR'),<string>)Now look at your code again with the implicit conversions in place...
    select date_period into v_date_period
    from t1
    where start_date = to_date(to_char(date1,'DD-MON-RR'),'MM/DD/YYYY')
    and end_date = to_date(to_char(date2,'DD-MON-RR'),'MM/DD/YYYY');Hmmm, so the to_date function is getting it's first parameter as a string in the format 'DD-MON-RR' and the second parameter is telling it that the first parameter is in the format 'MM/DD/YYYY'.
    The two dates you passed were:
    '01/01/2007'
    and
    '01/30/2007'
    But after the implicit conversion your code looks like...
    select date_period into v_date_period
    from t1
    where start_date = to_date('01-JAN-07','MM/DD/YYYY')
    and end_date = to_date('30-JAN-07','MM/DD/YYYY');As you can see there are numerous problems with this. The first one Oracle errored on was the fact that 30 is not a valid Month as defined by your format string.
    Hopefully that clarifies things a little more for you and you'll understand a little more about the differences between strings, dates and implicit and explicit conversion between the two using format strings and the NLS setting.
    ;)

  • How can I pass an empty array to a parameter of type PLSQLAssociativeArray

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

  • How to bind/pass multiple input parameters to sql query in BPEL Process

    Hi,
    I have a requirement to invoke a query on a database table to fetch the records based on the few input values or bind variables?
    I have created a Partner link using the DBAdapter service and have used custom SQL, how can i bind and pass multiple bind/input parameters for these queries.
    foreg: if i have to query employee records based on name , desgination and age, these three params would be my input parameter that i will pass when i invoke the BPEL process, bow how can i pass these parameters to the partner link using DBADAPTER service.
    Please help
    Regards

    If the parameter-value is not known beforehand and cannot be determined based on the process instance data at that time, there are 2 options. Either invoke the PL/SQL procedure you named using a DB adapter service to get the value and pass it to the other DB adapter service. Or create a single service (e.g. PL/SQL procedure) that determines the parameter value, executes the query and returns the result. However, this is more a design issue. Does it makes sense to combine these actions in a separate service and use it or are these actions not related? You furthermore state that additional (DB adapter) services make the process heavier. Do you have strict requirements on the time process-instances may run or other such requirements? If not, I think the design-choice on whether combining these actions in a single service should have more priority.

  • How can I pass empty value in URL Parameter

    Hi,
    I am passing different URL parameters to one page, to filter
    the recordset on that page. How can I pass an empty value in the
    URL parameter so that the recordset in unfiltered?
    The URL parameter is based on one field of the database:
    ContentType. So, the link would be to
    default.asp?ContentType=Event
    and then all records that have the ContentType field in the
    DB as Event are displayed. Is it possible to use this system to
    pass an empty parameter so that all records are displayed?
    Thanks
    Ian

    ?ContentType=All
    <% if (ContentType == "All")
    Build recordset w/o filtering
    ASP is rusty, but those are the basics.
    "iandobie" <[email protected]> wrote in
    message
    news:e8im80$q7m$[email protected]..
    > Hi,
    > I am passing different URL parameters to one page, to
    filter the recordset
    > on
    > that page. How can I pass an empty value in the URL
    parameter so that the
    > recordset in unfiltered?
    > The URL parameter is based on one field of the database:
    ContentType. So,
    > the
    > link would be to
    > default.asp?ContentType=Event
    > and then all records that have the ContentType field in
    the DB as Event
    > are
    > displayed. Is it possible to use this system to pass an
    empty parameter so
    > that
    > all records are displayed?
    > Thanks
    > Ian
    >

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • How can i pass parameters to every form sucessively or repeatedly

    How can i pass parameters to every form sucessively or repeatedly
    Eg: I have username which is specified in first form
    I want to display and use the username in each and every form after that form
    please tell me how to do
    i have one solution
    i.e., Normal way to pass parameters from one form to another!
    Is any procedure to pass paramters to all form at a time???

    excellent ...
    thanks for adding up to my post ..
    You can make use of parameters
    Every forms shud have same parameter name and u pass on the values of these
    Its one of the best ways

  • How to maintain pageFlowScope value across 2 japx??

    Hi All,
    How to maintain pageFlowScope values across the pages.
    In my application I got 2 jspx pages where the 1st page (result page) have two page fragments and no fragments in the 2nd page (Master Details page).
    I am triggering the 2nd jspx while clicking the continue button from the 1st jspx's 2nd fragment. I am using Java webservice DataControl in the model layer and both the pages sharing the same WS DC results. In the 2nd fragment I am displaying the user search result. While hitting the continue button I am collecting the selected userID and then triggering the 2nd jspx by passing the that userId thru pageFlowScope, which used to call the WS method once again.
    PageFlowScope losing the context while navigating to 2nd page. It is returning null value. If I remove 2nd page and create the new fragment in the first page itself then the master details is working well.
    Please help me how do I pass the pageFlowScope value from one page to other page without losing the value. I am using faces-config.xml for page navigation.
    Continue button Action method:
    public String userSelected() {
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "goToUserMgmt";
    Thanks
    kln

    I am not opening any new window for the 2nd jspx. Trying to open the 2nd jspx in the same window.
    I did the same as you mentioned.
    1) create first page idm.jspx
    2) create 1st page fragment search.jsff (Manually create the input fields...didnt drag and drop the WS DC input).
    3) create 2nd page fragment searchResult.jsff (drag and drop the WS DC result and setting #{pageFlowScope.netid} as value)
    4) create search-task-flow and attaching these 2 frag in it.
    5) Drag and drop the search-task-flow in to first page IDM as region.
    6) Creating 2nd page MasterDetails.jspx (Drag and drop the same WS DC result)
    7) Creating faces-config.xml where I drag and drop both the jspx and setting the navigation rule.
    (If continue from IDM.jspx then go to------>masterDetails.jspx)
    Here the String continue is return by the 1st page--2nd fragment continue button action method...
    This is what I am doing exactly....Any idea please why am I missing the pageFlowScope value!!!
    -kln

  • Passing arrays to procedure

    How can i pass arrays in a procedure as IN parameter
    for eg.
    If I have a procedure which takes an input login id and a input status
         procedure test(loginId IN varchar, status IN varchar)
         -- the procedure does insert and update using the input login id and input status
    Now, suppose i have a bunch of input login ids and a bunch of status, how can i pass the login id and status values as an array to the procedure instead of calling the procedure in a loop?

    This is best done using an object type and collection type, so you can make use of bulk SQL to perform the DML. I've given a short demo below:-
    First your target table...
    SQL> create table my_table ( id number, status varchar2(1) );
    Table created.Now we create an object type ( this defines the record structure for your parameter ). We then create a nested table type (collection) based on this record structure:-
    SQL> create type login_record_ot as object
      2  (  id     number
      3  ,  status varchar2(1)
      4  );
      5  /
    Type created.
    SQL> create type login_records_ntt as table of login_record_ot;
      2  /
    Type created.Now a demo package with a procedure to insert the input collection into the target table. This uses the TABLE expression ( combined with CAST just in case you are on 8i )...
    SQL> create package pkg as
      2     procedure insert_records (
      3               login_records_in in login_records_ntt
      4               );
      5  end pkg;
      6  /
    Package created.
    SQL> create package body pkg as
      2 
      3     procedure insert_records (
      4               login_records_in in login_records_ntt
      5               ) is
      6     begin
      7        insert into my_table ( id, status )
      8        select x.id
      9        ,      x.status
    10        from   table( cast( login_records_in as login_records_ntt )) x;
    11        dbms_output.put_line( sql%rowcount || ' rows inserted.' );
    12     end insert_records;
    13 
    14  end pkg;
    15  /
    Package body created.Now to use it. I'll load a dummy variable with a collection of IDs/statuses and pass them to the pkg.insert_records procedure...
    SQL> declare
      2     some_records login_records_ntt := login_records_ntt(
      3                                          login_record_ot( 1, 'X' ),
      4                                          login_record_ot( 2, 'Y' ),
      5                                          login_record_ot( 3, 'Z' ),
      6                                          login_record_ot( 4, 'A' ),
      7                                          login_record_ot( 5, 'B' )
      8                                          );
      9  begin
    10     pkg.insert_records( some_records );
    11  end;
    12  /
    5 rows inserted.
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from my_table;
            ID S
             1 X
             2 Y
             3 Z
             4 A
             5 BRegards
    Adrian

Maybe you are looking for

  • Spry Newbie needs some help

    It is the little things in life I was always told and all I am trying to do is to pretty much duplicate the form validation demo. However I am not even sure where to begin. I have created many forms and have had them submit and returned in an emial s

  • Deleting prior messages

    Just got a new BB Curve 9300 yesterday and so far I've had several issues. I was a BB user for years, had to go try an android for a year, but now I'm back. First I had probelms going thru the set up email wizard....taked to my carrier and went all t

  • RE:  Style bugs in RoboHelp 7

    Have tried to modify a Style using methods explained in Help.? Example:  modified Heading 1 to font 12, bold & Keep with Next - then compiled & clicked on Review Results - Heading 1 is OK - BUT when I return to project to add or edit text the Heading

  • How to fix songs that "crackles" on my iPhone 4

    Hello, does anyone know how to fix songs that "crackles" on my iPhone 4? Is definitely because of the sync but I do not know how to fix this issue. Thanks and regards

  • Importing eps images to Photoshop 8.0

    How do I import eps images to Photoshop 8.0?