Results 1 to 2 of 2

Thread: Field looping

  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Unanswered: Field looping

    Hi, is there a way to loop thru all field in a row without knowing the field name something like that
    DECLARE
    rec XYZ%rowtype;
    BEGIN
    for i in 1..10 loop
    dbms_output.printline(rec(i));
    end loop;
    END;
    ? Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Field looping

    Originally posted by nbernierpq
    Hi, is there a way to loop thru all field in a row without knowing the field name something like that
    DECLARE
    rec XYZ%rowtype;
    BEGIN
    for i in 1..10 loop
    dbms_output.printline(rec(i));
    end loop;
    END;
    ? Thanks
    You can certainly loop through the rows without knowing the field names, but you can't output the values without using the names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •