DB2 to MySQL query converter

DB2 to MySQL query converter

am 27.03.2006 16:52:37 von jimnl69

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 help greatly appreciated!

Re: DB2 to MySQL query converter

am 27.03.2006 17:00:51 von jimnl69

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