I am attempting to move a stored procedure from Microsoft SQL Server 2000 to Informix 11. The original SP contains a final select statement with a GROUP BY statement that includes a converted datetime:
group by convert(varchar(8), c.startDateTime, 1)
When I convert this to Informix syntax I get a syntax error at run time:
GROUP BY (c.startDateTime::DATETIME YEAR TO DAY)::VARCHAR(10)
Can anyone please point me to how, if possible, this can be done in Informix? If this is not possible, which I suspect, how would you typically handle this in the overall query?
I think you need to convert from this:
to something like: