Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring to Column By Position

Status
Not open for further replies.

jtanner

Technical User
Feb 18, 2007
39
US
Greetings,

How can I refer to a column\field in a cursor via the position of the column rather than by its name?

Psuedo Code (not working):
Code:
CURSOR c IS SELECT * FROM emp;
...
FOR rec IN c
LOOP
htp.p('<tr>' ||
   '<td>' || rec(1) || '</td>' ||
   '<td>' || rec(2) || '</td>' ||
   '</tr>');
END LOOP;

Thanks,

JT
 

You could combine a 'BULK COLLECT' with PL/SQL arrays. [3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top