Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- DB2 to MySQL query converter
March 27, 2006, 2:52 pm
rate this thread
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 help greatly appreciated!
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum