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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Columns by Number not Column Name

Status
Not open for further replies.

mcgibbong

Programmer
Jan 17, 2002
38
GB
I want to write a generic function to compare the before amendment and after amendment rows in an Audit Table created by various triggers.

Can you access the columns using 1 to no of columns in the same way as you can order by 1 etc?

I thought of picking up the column names from all_tab_columns, but this only gives me the description of the names, and i dont know how to use these to find out the 'Contents of' these fields.

Hope someone can help.

 
u may try it using column alias. hope it'll work.
so for as order by is concerned it gets from among the selected columns.
 
I think that this "generic" procedure will be quite inefficient. You can access those fields using dynamic sql, but how do you plan to identify your ROW?

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top