Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, William.
Asked: June 20, 2017 - 12:44 pm UTC
Last updated: July 20, 2017 - 4:38 pm UTC
Version: 12c
Viewed 10K+ times! This question is
update trans a set activityfeeamt = ( select sum(tl.totaldolamt * -1)Fee from transled tl where a.transid = tl.transid and a.planid = tl.planid and tl.planid = '0003' and tl.transtypecd = 'Di' group by tl.transid, tl.planid, tl.ssnum having sum(tl.totaldolamt * -1) < (select t.activityfeeamt from trans t where t.planid = '0003' and tl.transid = t.transid) );
update trans a set activityfeeamt = ( select sum( tl.totaldolamt *-1 ) fee from transled tl where a.transid = tl.transid and a.planid = tl.planid and tl.planid = '0003' and tl.transtypecd = 'Di' group by tl.transid, tl.planid, tl.ssnum ) where activityfeeamt > ( select sum( tl.totaldolamt *-1 ) fee from transled tl where a.transid = tl.transid and a.planid = tl.planid and tl.planid = '0003' and tl.transtypecd = 'Di' group by tl.transid, tl.planid, tl.ssnum );
Kevin Seymour, July 20, 2017 - 3:20 pm UTC
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!