Link to home
Start Free TrialLog in
Avatar of IT_newbie01
IT_newbie01

asked on

Oracle query consolidation

Good Morning Experts,

I'm looking to merge 2 Oracle queries.  I'm want to take the 1st query and use it's results for the where clause in the 2nd query.  I've got the quries below.  Any thoughts?  This should be doable right?

select * from suserflds susr, sample s, billing b where s.sampno = b.sampno and susr.sampno = s.sampno and s.sstatus = 'V' and s.invdate  to_date('12-30-1899','mm-dd-yyyy') and susr.comment is null;

--Changes the invoice date per the billing table
update sample set invdate = (Select max(invdate) from billing where sampno = sampno) where sampno in (' THIS WHERE THE RESULTS OF THE 1st query WILL GO');
ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IT_newbie01
IT_newbie01

ASKER

Awesome thanks!