Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Compare two rows
paulhux174_at_hotmail.com wrote in
news:1133742299.113382.78940_at_g43g2000cwa.googlegroups.com:
> rec1 testTable%ROWTYPE -- have substaniated this variable
>
>
> How can I reference a column in the record dynamically?
>
> eg:
> instead of using
> value1 := rec1.column1;
> how can I use a variable instead of column1
>
> thisColumn varchar2 (30) := 'column1';
> value1 := rec1(thisColumn);
>
> thisColumn := 'column4';
> value1 := rec1(thisColumn);
>
>
You don't.
A shovel is a great tool for making a hole in the ground; but only when the "correct" end of the shovel contacts the Earth.
You are using the wrong end of Oracle. Received on Sun Dec 04 2005 - 19:59:56 CST