Home » SQL & PL/SQL » SQL & PL/SQL » help for retrieve the columns name from a table
help for retrieve the columns name from a table [message #36540] Tue, 04 December 2001 01:44 Go to next message
Gianni
Messages: 7
Registered: November 2001
Junior Member
Hi to everybody,
I need a help!
I used these instruction for retrieve the columns name from a table TIPOVALUTAZIONE using a cursor in a procedure:

cursor tipoval_cursor is
SELECT column_name FROM user_tab_columns
WHERE table_name = 'TIPOVALUTAZIONE';
tipoval_crs tipoval_cursor%ROWTYPE;

Then I use these instruction into the BEGIN block:

for tipoval_crs in tipoval_cursor LOOP
utl_file.putf(f_id,tipoval_crs.CODVALUTAZIONE||'|'||tipoval_crs.TIPOVALUTAZIONE||'n');
END LOOP;

But that doesn't work!
How can I do for retrieve that names and put them into a .txt file??
Thanks in advance and best regards.
Gianni

----------------------------------------------------------------------
Re: help for retrieve the columns name from a table [message #36541 is a reply to message #36540] Tue, 04 December 2001 04:21 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
for tipoval_crs in tipoval_cursor LOOP
utl_file.putf(f_id,tipoval_crs.column_name||' TIPOVALUTAZIONE'||'n');
END LOOP;

----------------------------------------------------------------------
Previous Topic: add_months
Next Topic: Problems with parmeter in procedures
Goto Forum:
  


Current Time: Thu Mar 28 06:14:38 CDT 2024