FETCH multiple rows into different variables

Dear all,
i would like to have a loop to fetch 2 rows into 2 separate variables at a time. Does anybody have a clue how could I do this?
Thanx

You can't do it with a FOR record IN cursor LOOP. You'll have to do it the old-fashioned way, something like this:
DECLARE
   CURSOR c1 IS SELECT blah....
   r1 C1%ROWTYPE;
   r2 C1%ROWTYPE;
BEGIN
   OPEN c1;
   LOOP
      FETCH c1 INTO r1;
      IF C1%NOTFOUND THEN
         EXIT;
      END IF;
      FETCH c1 INTO r2;
      IF C1%NOTFOUND THEN
         EXIT;
      END IF;
      do_some_stuff;
   END LOOP;
   CLOSE c1;
END;
/Cheers, APC

Similar Messages

  • Merge multiple rows into single row (but multiple columns)

    How to merge multiple rows into single row (but multiple columns) efficiently.
    For example
    IDVal IDDesc IdNum Id_Information_Type Attribute_1 Attribute_2 Attribute_3 Attribute_4 Attribute_5
    23 asdc 1 Location USA NM ABQ Four Seasons 87106
    23 asdc 1 Stats 2300 91.7 8.2 85432
    23 asdc 1 Audit 1996 June 17 1200
    65 affc 2 Location USA TX AUS Hilton 92305
    65 affc 2 Stats 5510 42.7 46 9999
    65 affc 2 Audit 1996 July 172 1100
    where different attributes mean different thing for each Information_type.
    For example for Information_Type=Location
    Attribute_1 means Country
    Attribute_2 means State and so on.
    For example for Information_Type=Stats
    Attribute_1 means Population
    Attribute_2 means American Ethnicity percentage and so on.
    I want to create a view that shows like below:
    IDVal IDDesc IDNum Country State City Hotel ZipCode Population American% Other% Area Audit Year AuditMonth Audit Type AuditTime
    23 asdc 1 USA NM ABQ FourSeasons 87106 2300 91.7 46 85432 1996 June 17 1200
    65 affc 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100
    Thanks

    Hi,
    That's called Pivoting . The forum FAQ has a section on this subject: {message:id=9360005}
    I hope this answers your question.
    If not, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data. (You did post the results you wanted, but they're very hard to read because they're not formatted. Use \ tags, as described in the forum FAQ, below.)
    Explain, using specific examples, how you get the results you want from the data given.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).  This is always important, but especially so with pivots.
    See the forum FAQ {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • Store multiple values into a variable

    I was wondering if it was possible to store multiple values into one varaible. Something along the lines of...
    Oracle: 10g
    --Table xSample (this is obviously a dumbed down version of the table for the sake of showing what I want to accomplish
    S_ID   YEAR
    1         2009
    2         2009
    3         2009
    4         2009
    --Query
    select     s_id
    into       pID
    from      xSample
    where    year = 2009;Basically the reason I was trying to figure out how to store multiple values into a variable is b/c I was going to use that variable (pID) as a parameter and have it's values passed dynamically when the proc was called. The values would go into a query that would look something like:
    select *
    from cust_data
    where person_id in (pID)
    aka
    select *
    from cust_data
    where person_id in (1,2,3,4)Not sure if this is possible, but if anyone knows of a way I could accomplish this that would be great.
    Edited by: user652714 on Dec 23, 2009 9:37 AM

    Here's a basic idea building a comma seperated list, then consuming it in another query (taking the in list approach from Tom's post, linked earlier).
    create table xsample (s_id number not null, year number);
    insert into xsample select level, 2009 from dual connect by level <=4;
    commit;
    declare
       --4000 should be lots ... hopefully?
       v_parameter_list varchar2(4000);
    begin
      --create the comma seperated list
      select
        substr(max(sys_connect_by_path(s_id, ',') ), 2, 4000)
      into
        v_parameter_list
      from
        select s_id, row_number() over(order by 1) as rn
        from xsample
        where year = 2009
      start with rn = 1
      connect by prior rn = rn - 1;
      --consume the comma seperated list
      for x in
        with data as
          select
            trim( substr (txt,
            instr (txt, ',', 1, level  ) + 1,
            instr (txt, ',', 1, level+1)
            - instr (txt, ',', 1, level) -1 ) ) as token
          from
            select ','||v_parameter_list||',' txt
            from dual
          connect by level <= length(v_parameter_list)-length(replace(v_parameter_list,',',''))+1
        select *
        from xsample
        where s_id in (select * from data) 
      loop
        dbms_output.put_line('next item = ' || x.s_id);
      end loop;
    end;
    /

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

  • Inserting multiple rows into a table (using sequences)

    Hi!
    I want to insert multiple rows into a db table, but I don't know how.
    I know how to insert 1 row using a sequence:
    I put all the fields in the jsp form's page and in the submit page I put something like this:
    <jbo:Row id="myRow" datasource="ds" action="Update" rowkeyparam="MyRowKey" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    But how can I insert multiple rows like this:
    Id          Name
    1          ana
    2          monteiro
    3          maria
    Thanks!

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • Insert multiple rows into a same table from a single record

    Hi All,
    I need to insert multiple rows into a same table from a single record. Here is what I am trying to do and I need your expertise. I am using Oracle 11g
    DataFile
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    The data needs to be loaded as
    Field1      Field2
    1               1001
    1               2001
    1               3001
    1               4001
    2               1002
    2               2002
    2               3002
    2               4002
    Thanks

    You could use SQL*Loader to load the data into a staging table with a varray column, then use a SQL insert statement to distribute it to the destination table, as demonstrated below.
    SCOTT@orcl> host type test.dat
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    SCOTT@orcl> host type test.ctl
    load data
    infile test.dat
    into table staging
    fields terminated by ','
    ( field1
    , numbers varray enclosed by '"' and '"' (x))
    SCOTT@orcl> create table staging
      2    (field1  number,
      3     numbers sys.odcinumberlist)
      4  /
    Table created.
    SCOTT@orcl> host sqlldr scott/tiger control=test.ctl log=test.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Wed Dec 18 21:48:09 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 2
    SCOTT@orcl> column numbers format a60
    SCOTT@orcl> select * from staging
      2  /
        FIELD1 NUMBERS
             1 ODCINUMBERLIST(1001, 2001, 3001, 4001)
             2 ODCINUMBERLIST(1002, 2002, 3002, 4002)
    2 rows selected.
    SCOTT@orcl> create table destination
      2    (field1  number,
      3     field2  number)
      4  /
    Table created.
    SCOTT@orcl> insert into destination
      2  select s.field1, t.column_value
      3  from   staging s, table (s.numbers) t
      4  /
    8 rows created.
    SCOTT@orcl> select * from destination
      2  /
        FIELD1     FIELD2
             1       1001
             1       2001
             1       3001
             1       4001
             2       1002
             2       2002
             2       3002
             2       4002
    8 rows selected.

  • Trying to convert multiple rows into multipe columns within a single row

    I am trying to convert data from multiple rows into multiple columns. Let me see if I can paint the picture for you.
    Here is a sample of the table i am trying to read from:
    Company Name Account
    1 Sam 123
    1 Sam 234
    1 Joe 345
    1 Sue 789
    1 Sue 987
    1 Sue 573
    I am trying to put this into a View that would have the data represented as such:
    Company Name Acct1 Acct2 Acct3 Acct4
    1 Sam 123 234 <null> <null>
    1 Joe 345 <null> <null> <null>
    1 Sue 789 987 573 <null>
    Many thanks in advance for your help!

    test@XE> --
    test@XE> with t as (
      2    select 1 as company, 'Sam' as name, 123 as account from dual union all
      3    select 1, 'Sam', 234 from dual union all
      4    select 1, 'Joe', 345 from dual union all
      5    select 1, 'Sue', 789 from dual union all
      6    select 1, 'Sue', 987 from dual union all
      7    select 1, 'Sue', 573 from dual)
      8  --
      9  select company,
    10         name,
    11         max(case when rn = 1 then account else null end) as acct1,
    12         max(case when rn = 2 then account else null end) as acct2,
    13         max(case when rn = 3 then account else null end) as acct3,
    14         max(case when rn = 4 then account else null end) as acct4
    15    from (select company,
    16                 name,
    17                 account,
    18                 row_number() over (partition by company, name order by 1) as rn
    19            from t)
    20   group by company, name;
       COMPANY NAM      ACCT1      ACCT2      ACCT3      ACCT4
             1 Joe        345
             1 Sam        234        123
             1 Sue        573        789        987
    3 rows selected.
    test@XE>
    test@XE>isotope

  • Convert  multiple rows into single rows for the respective index name

    Dear Experts,
                             I want to convert  multiple rows into single rows for the respective index name,
                            Here is my query.
    SELECT user_tables.table_name, user_indexes.index_name, user_ind_columns.column_name
    FROM user_tables
    JOIN user_indexes on user_indexes.table_name = user_tables.table_name
    join USER_IND_COLUMNS on USER_INDEXES.INDEX_NAME = USER_IND_COLUMNS.INDEX_NAME
    where user_indexes.index_name not like '%PK%' AND user_ind_columns.column_name NOT LIKE '%SYS%'
    ORDER BY user_tables.table_name,user_indexes.index_name;
    Result of previous query
    TABLE_NAME
    INDEX_NAME
    COLUMN_NAME
    T1
    IDX_ACCNTYPCFG1
    ENABLE_SERVICE
    T1
    IDX_ACCTTYPCFG1
    ACC_CODE
    T1
    IDX_ACCTTYPCFG1
    ACCTYPE
    T2
    IDX_ACCTTYPCFGAPP1
    ACCTYPE
    T3
    IDX_ACTLG1
    MOBILE_NO
    T3
    IDX_ACTLG1
    ID
    Desired output required is
    TABLE_NAME
    INDEX_NAME
    COLUMN_NAME
    T1
    IDX_ACCNTYPCFG1
    ENABLE_SERVICE,ACC_CODE,ACCTYPE
    T2
    IDX_ACCTTYPCFGAPP1
    ACCTYPE
    T3
    IDX_ACTLG1
    ACCTYPE,MOBILE_NO
    please help.

    Maybe
    with
    user_tables as
    (select 'T1' table_name,'IDX_ACCNTYPCFG1' index_name,'ENABLE_SERVICE' column_name from dual union all
    select 'T1','IDX_ACCTTYPCFG1','ACC_CODE' from dual union all
    select 'T1','IDX_ACCTTYPCFG1','ACCTYPE' from dual union all
    select 'T2','IDX_ACCTTYPCFGAPP1','ACCTYPE' from dual union all
    select 'T3','IDX_ACTLG1','MOBILE_NO' from dual union all
    select 'T3','IDX_ACTLG1','ID' from dual
    select table_name,
           case index_name when 'IDX_ACCNTYPCFG1' then 'IDX_ACCTTYPCFG1' else index_name end index_name,
           listagg(case column_name when 'ID' then 'ACCTYPE' else column_name end,',') within group (order by null) column_name
      from user_tables
    group by table_name,case index_name when 'IDX_ACCNTYPCFG1' then 'IDX_ACCTTYPCFG1' else index_name end
    TABLE_NAME
    INDEX_NAME
    COLUMN_NAME
    T1
    IDX_ACCTTYPCFG1
    ACCTYPE,ACC_CODE,ENABLE_SERVICE
    T2
    IDX_ACCTTYPCFGAPP1
    ACCTYPE
    T3
    IDX_ACTLG1
    ACCTYPE,MOBILE_NO
    Regards
    Etbin

  • Multiple Row-wise session Variable in One Init Block

    Hi All,
    Can we create Multiple Row-wise session Variable in the same Init Block ?
    I need 10 session varibales with row-wise initialization in the same block otherwise i will have to create 10 initialization block .
    Any help is appreciated.
    Thanks,
    Ally

    Hi Ally,
    I'm not sure if this will work but have you tried a UNION ALL statement?
    ie.
    SELECT 'GROUP, group_id
    FROM groups
    UNION ALL
    SELECT 'DEPT',dept_id
    FROM depts
    etc....

  • Multiple Row into single Row

    Hi friends,
    I have one table like:
    10 SAM
    10 CAN
    10 MAN
    10 DEV
    20 MAL
    And want output like:
    10 SAM,CAN,MAN,DEV
    20 MAL
    i want to combine multiple rows into one within an existing view.
    What query will suit this to get this type of output.

    Please refer to this thread
    column values separated by ,

  • Inserting multiples rows into a table using function or procedure..

    How do i insert multiples rows into a table using function or procedure?
    Please provide me query..

    Use FORALL bulk insert statement...
    eg:
    procedure generate_test_data as
    type cl_itab is table of integer index by pls_integer;
    v_cl_itab cl_itab;
    type cl_vtab is table of varchar2(25) index by pls_integer;
    v_cl_vtab cl_vtab;
    type cl_dtab is table of date index by pls_integer;
    v_cl_dtab cl_dtab;
    begin
    for i in 1.. 100 loop
              v_cl_itab(i):= dbms_random.value(1,1000);
              v_cl_vtab (i):=dbms_random.string('a',20);
              v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');          
         end loop;
         forall i in v_cl_itab.first .. v_cl_itab.last
              execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);          
         commit;
    end;

  • Insert multiple rows into table

    Hi,
    I want to insert into multiple rows into a table,say 1m rows.
    Can somebody help me out...
    Thanks

    rp0428 wrote:
    >
    ALTER TABLE t1 NOLOGGING;
    insert /*+ append */ into t1 select col1, col2, col3 from source_table;
    alter table test_table logging;
    >
    It's usually standard practice that if you set a table (e.g. 't1' in your example) to NOLOGGING then you should set the same table back to LOGGING after the insert. Setting table 'test_table' to LOGGING isn't really what you intended is it? ;)Ohh yes, It was a Typo. I am so accustomed to Test_table on OTN that I forgot, I had actually used the table T1 in demonstration.
    I meant as below
    ALTER TABLE t1 NOLOGGING;
    insert /*+ append */ into t1 select col1, col2, col3 from source_table;
    alter table t1 logging;Thanks for correcting me :)

  • How do I insert multiple values into different fields in a stored procedure

    I am writing a Stored Procedure where I select data from various queries, insert the results into a variable and then I insert the variables into final target table. This works fine when the queries return only one row. However I have some queries that return multiple rows and I am trying to insert them into different fields in the target table. My query is like
    SELECT DESCRIPTION, SUM(AMOUNT)
    INTO v_description, v_amount
    FROM SOURCE_TABLE
    GROUP BY DESCRIPTION;
    This returns values like
    Value A , 100
    Value B, 200
    Value C, 300
    The Target Table has fields for each of the above types e.g.
    VALUE_A, VALUE_B, VALUE_C
    I am inserting the data from a query like
    INSERT INTO TARGET_TABLE (VALUE_A, VALUE_B, VALUE_C)
    VALUES (...)
    How do I split out the values returned by the first query to insert into the Insert Statement? Or do I need to split the data in the statement that inserts into the variables?
    Thanks
    GB

    "Some of the amounts returned are negative so the MAX in the select statement returns 0 instead of the negative value. If I use MIN instead of MAX it returns the correct negative value. However I might not know when the amount is going to be positive or negative. Do you have any suggestions on how I can resolve this?"
    Perhaps something like this could be done in combination with the pivot queries above, although it seems cumbersome.
    SQL> with data as (
      2        select  0 a, 0 b,  0 c from dual   -- So column a has values {0, 1, 4},
      3  union select  1 a, 2 b, -3 c from dual   --    column b has values {0, 2, 5},
      4  union select  4 a, 5 b, -6 c from dual ) --    column c has values {0, -3, -6}.
      5  --
      6  select  ( case when max.a > 0 then max.a else min.a end) abs_max_a
      7  ,       ( case when max.b > 0 then max.b else min.b end) abs_max_b
      8  ,       ( case when max.c > 0 then max.c else min.c end) abs_max_c
      9  from    ( select  ( select max(a) from data ) a
    10            ,       ( select max(b) from data ) b
    11            ,       ( select max(c) from data ) c
    12            from      dual ) max
    13  ,       ( select  ( select min(a) from data ) a
    14            ,       ( select min(b) from data ) b
    15            ,       ( select min(c) from data ) c
    16            from      dual ) min
    17  /
    ABS_MAX_A  ABS_MAX_B  ABS_MAX_C
             4          5         -6
    SQL>

  • Fetches more values into one variable

    Hi, inside a cursor loop I'd like to assign, each fetch, a value to a variable, in order, at the end to have a collection of all the values fetched into the same variable.
    The code is the following:
    CREATE OR REPLACE procedure APPS.AAA as
    v_pino varchar2(64);
    CURSOR tks_opened_range IS
    SELECT incident_number AS YP_TKS_OPENED_WITHIN_RANGE FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
    WHERE b.incident_status_id = c.incident_status_id
    AND a.incident_status_id = b.incident_status_id
    AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
    AND c.language = 'EL'
    AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) BETWEEN 1 AND 11111111111
    AND incident_attribute_2 IN ('ΓΕΝΙΚΗ ΔΙΕΥΘΥΝΣΗ ΤΕΧΝΟΛΟΓΙΑΣ')
    ORDER BY incident_number;
    rec_tks_opened_range tks_opened_range%ROWTYPE;
    begin
    FOR rec_tks_opened_range IN tks_opened_range
    LOOP
    v_pino := rec_tks_opened_range.YP_TKS_OPENED_WITHIN_RANGE;
    DBMS_OUTPUT.PUT_LINE('v_pino: ' || v_pino);
    end loop;
    end AAA;
    This works with the variable v_pino!....but at the end, the value of the variable v_pino is ONLY the last fetched by the cursor.
    Is there a way to declare a variable (or better a collection) or a new type in order to have all the data fetched into this variable and the end of the fetching ?
    I need to know this trick because, after, I have to assign this variable to a pipelined table function.
    Thanks in advance
    Alex
    /

    Great Devang !! Thanks a lot ! It works ! Now I am able to retrieve all the values I need and store them into my variable gino
    I searched on the note you mentioned in your mail in order to pass an array as a variable to a table function (PIPE ROW call), but I didn't find nothing about it.
    Now I explain to you my situation.
    I already implemented a table function that works perfectly. I have 2 cursors declared and 2 PIPE ROW calls.
    FUNCTION statistic_report_2_1 (p_resolv_time_ll varchar2, p_resolv_time_ul varchar2, p_ypiresia varchar2)
    RETURN xxi_statistic_rep_2_1_tab PIPELINED
    IS
    -- CURSORS FOR THE FIRST SHEET - Tickets opened per group and per duration
    -- Cursor for tickets opened within 1 hour --
    CURSOR tks_opened_1_h IS
    SELECT incident_number AS YP_TKS_OPENED_WITHIN_1_HOUR
    FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
    WHERE b.incident_status_id = c.incident_status_id
    AND a.incident_status_id = b.incident_status_id
    AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
    AND c.language = 'EL'
    AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) < 60
    AND incident_attribute_2 IN (SELECT * FROM TABLE(CAST(xxi_szf_discoverer.ypiresia_values(p_ypiresia) AS xxi_ypiresia_list_tab)))
    ORDER BY incident_number;
    rec_tks_opened_1_h tks_opened_1_h%ROWTYPE;
    -- Cursor for tickets opened between 1 hour and 3 hours --
    CURSOR tks_opened_1_3_h IS
    SELECT incident_number AS YP_TKS_OPENED_BE_1_3_HOURS FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
    WHERE b.incident_status_id = c.incident_status_id
    AND a.incident_status_id = b.incident_status_id
    AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
    AND c.language = 'EL'
    AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) BETWEEN 60 AND 179
    AND incident_attribute_2 IN (SELECT * FROM TABLE(CAST(xxi_szf_discoverer.ypiresia_values(p_ypiresia) AS xxi_ypiresia_list_tab)))
    ORDER BY incident_number;
    rec_tks_opened_1_3_h tks_opened_1_3_h%ROWTYPE;
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    -- FIRST SHEET OPEN CURSORS --
    TICKETS NUMBER OPENED WITHIN 1 HOUR
    FOR rec_tks_opened_1_h IN tks_opened_1_h
    LOOP
    PIPE ROW(stat_rep_2_1_type(
    rec_tks_opened_1_h.YP_TKS_OPENED_WITHIN_1_HOUR
    END LOOP;
    -- TICKETS NUMBER OPENED BETWEEN 1 HOUR AND 3 HOURS --
    FOR rec_tks_opened_1_3_h IN tks_opened_1_3_h
    LOOP
    PIPE ROW(stat_rep_2_1_type(
    ,rec_tks_opened_1_3_h.YP_TKS_OPENED_BE_1_3_HOURS));
    END LOOP;
    RETURN;
    END statistic_report_2_1;
    But, in this way and with this syntax, I obtain for each PIPE ROW call only one field filled each time, because I can’t call 2 cursors in a nested loop together (data duplication);
    For example:
    1st PIPE ROW call : only the first field is filled and into the second I have to put ‘’
    2nd PIPE ROW call : only the second field is filled and into the first I have to put ‘’
    ….and I cant’ call with a single PIPE ROW call two cursor variables…..
    Into a Discoverer report this data layout is really bad (you can imagine with thousand
    of records).
    For this reason I thought to use an array variable (gino) to pass to a single PIPE ROW call outside the cursor loop……but it doesn’t work !!!
    Can you suggest me how to resolve this problem….if it possible ?
    Did I have to declare other TYPE or collection ?
    Thanks you so much
    Alex

Maybe you are looking for