Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: more pl/sql question
Hi David
If it's possible i would try to use a join between the two tables, something like
select a.id, a.dna_sequence, additional_stuff
from table1 b, table2 a
where a.id = b.seq_ids
or
select id, dna_sequence, additional_stuff
from table2
where id in (select seq_ids from table1)
if you have to use different statements in the PL/SQL use the cursor
function,
this might help:
begin
for crs1 in (select seq_ids from table1)
loop
select dna_sequence, .. into ... from table2 where id = crs1.seq_ids
do your stuff hear
end loop
end;
HtH
eugen
Received on Tue Jun 16 1998 - 04:39:07 CDT