December 12, 2003 at 8:54 am
Does anyone know how to write this Oracle update statement for SQL Server? I can't seem to find a way to get this done without writing two update statements.
update testtab set (obd,vrd) =
(select sum(ob_oblig), sum(ob_vchrd)
from s_obl_bal
where ob_fund = '796');
December 12, 2003 at 9:03 am
I'm not an Oracle guy, so I do not completely understand what the posted statement is supposed to do. Can you post your two TSQL Update statements?
Once you understand the BITs, all the pieces come together
December 12, 2003 at 10:29 am
I'm not an Oracle guy either, but did you mean this?
updatetesttab
setobd = b.ob_oblig,
vrd = b.ob_vchrd
from(selectsum(ob_oblig) as ob_oblig,
sum(ob_vchrd) as ob_vchrd
from s_obl_bal
whereob_fund = '796') as b
December 22, 2003 at 9:32 am
That's it! Thank you very much!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply