Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. SA2011

    DB2 Query for extracting multiple columns/rows

    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...
  2. SA2011

    DB2 MULTIPLE CALCULATIONS - SINGLE QUERY HELP !!!

    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...
  3. SA2011

    DB2 MULTIPLE CALCULATIONS - SINGLE QUERY HELP !!!

    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...
  4. SA2011

    DB2 MULTIPLE CALCULATIONS - SINGLE QUERY HELP !!!

    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...

Part and Inventory Search

Back
Top