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-d d-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');
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-d
--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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER