|
Prev: can a trigger do an execute immediate?
Next: db2stop and db2start require password in partition env
From: ChrisC on 23 Apr 2008 18:18 Tonkuma wrote: > If you have some columns to relate a planned row with a fabbed row, > you can use them for join condition. If you have that column to join on, you can ignore the join altogether. For instance, if you have a WEEK column that you are reporting by, you could use: SELECT WEEK, SUM(case when mytype = 8 then weekscum end) as fabbed, SUM(case when mytype = 15 then weekscum end) as planned FROM mytable WHERE ccin_id = 1 AND plant_id = 1 GROUP BY WEEK
|
Pages: 1 Prev: can a trigger do an execute immediate? Next: db2stop and db2start require password in partition env |