|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Does such a thing exist? I have the following DB2 query I need to
rewrite to work with MySQL and am having trouble: SELECT DAY(`DATE`), CASE WHEN STATUS='O' OR STATUS='N' OR STATUS='V' OR STATUS='H' OR STATUS='P' OR STATUS='C' OR STATUS='M' THEN 'O' ELSE 'I' END AS STATUS, `GROUP`, COUNT (*) FROM DPS.MYTABLE WHERE YEAR(`DATE`)=2006 AND MONTH(`DATE`)=3 GROUP BY `DATE`, `GROUP`, STATUS ORDER BY 1, `GROUP` If I remove COUNT(*) from the query it works but I don't get the count that I need. Any greatly appreciated! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Since I can't figure out how to delete this message, just ignore it.
Turns out the problem was the space between my COUNT and (*). When I changed it to COUNT(*) it worked fine. THanks... |
|
![]() |
| Outils de la discussion | |
|
|