hi
i have to update a table based on a criteria with value selected from another table. i am writting a java progg for it . i just want to know can it be done with one statement.
my purpose is
result set rs =select (ID) from Tab1 where colmB is null
LOOP rs
select ID2 from tab2 where colC=ID
update tab3 set colD=ID2 where colC=ID and colD is null
end LOOP
hope i have explained my problem clearly...
can anyone please help me in this..
i have to update a table based on a criteria with value selected from another table. i am writting a java progg for it . i just want to know can it be done with one statement.
my purpose is
result set rs =select (ID) from Tab1 where colmB is null
LOOP rs
select ID2 from tab2 where colC=ID
update tab3 set colD=ID2 where colC=ID and colD is null
end LOOP
hope i have explained my problem clearly...
can anyone please help me in this..
Comment