Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Better way to do this

Better way to do this

From: Steve J. <none_at_none.com>
Date: Tue, 17 Jun 2003 00:21:37 GMT
Message-ID: <latHa.123797$3Sm.27844@news01.bloor.is.net.cable.rogers.com>


Hi all,
I have a table looks like this:
create table t_history
(

   c_id number,
   start_date date,
   end_date date,
   c1 number ,
   c2 number,
    ...
   cn
);
right now I need to return c1,...,cn in a plsql block like this(pseudo): select (select c1 from t_history where end_date = a.start_date and c_id=a.c_id) as old_c1, a.c1 as new_c1,... from t_history a
where a.c_id=input_cid

This audit table has dozens of columns need to be returned in same way in one returning cursor, is there a better way?

TIA -s Received on Mon Jun 16 2003 - 19:21:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US