SELECT WBS2, (SUM(CASE WHEN wbs2 = '9001' THEN amount * - 1 END)) AS reimb
FROM LedgerAR
WHERE (WBS1 = '001-298') AND (WBS2 <> 'zzz') AND (WBS3 <> 'zzz') AND transtype = 'in'
GROUP BY wbs2
this is what the output looks like:
wbs2 amount
0141 0
1217 0
1218 0
1219 0
1222 0
1223 0
9001 3271.02
Id there a way to specify where I want this exact amount to display without having to a subquery. I would ideally like to take the 3271.02 and put it where wbs2 = '1217'
Any suggestions?
Thank You.You mean you want to reorder the results to that
9001, 3271.02
is in the second row?
Showing posts with label reimbfrom. Show all posts
Showing posts with label reimbfrom. Show all posts
Subscribe to:
Posts (Atom)