Hello all,
Please look at Query1, in which I would like to add more CASE statements.
Query1
SELECT CASE WHEN LDGR_NO = 800100 THEN LDGR_BAL_AM ELSE NULL END AS TRADE1 FROM DEVL8SGA.A_SGA_GRP_PSTN_SNP WHERE ACCT_NO = 791189 AND LDGR_NO = 800100
(When I execute the above query there are...
Hello Marc
This did work. Thanks a heap.
Also, got to know that we cant use the IN Predicate in the select statement, so i guess thats where i was going wrong.
Thanks for your advise and help and also want to find out what you meant by having more efficiency.Did you mean that by using Union...
Hello Ties
Thanks for replying to my Query.
Q1
===
Select
sum(case when LDGR_NO in (311000,312000) then LDGR_BAL_AM else 0 end) as Sum1,
sum(case when LDGR_NO in (911000,912000) then LDGR_BAL_AM else 0 end) as Sum2,
sum(case when LDGR_NO in (314000, 312000, 414000,454000) then LDGR_BAL_AM...
Hello all,
My project requires me to build a single query for making some multiple field calculations. Also tried to build a Query which is as below
SELECT
sum(case when LDGR_NO in (311000,312000) then LDGR_BAL_AM else 0 end) as Sum1
sum(case when LDGR_NO in (911000,912000) then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.