Discussion Locked

ODBC ANSI compliance for Informix SQL

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an application that generates the following SQL. SELECT Month( AL1.load_date ), Count (AL1.trip_id) FROM iw.tspmastr AL1
WHERE (AL1.load_date>?TETIME (2002-01-01 00:00:00.000) YEAR TO FRACTION(5)) GROUP BY Month( AL1.load_date )

The database returns an error.

If I modify the SQL to be: SELECT Month( AL1.load_date ), Count (AL1.trip_id) FROM iw.tspmastr AL1
WHERE (AL1.load_date>?TETIME (2002-01-01 00:00:00.000) YEAR TO FRACTION(5)) GROUP BY Month( 1 )

it works. Should the database support both? Is it a driver issue? Or is the SQL in the first statement simply wrong and not ANSI standard?

the database is Informix.

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.