I think I've found a bug--can anyone else confirm this? It appears that SQLAlchemy cannot query SQLServer time columns because Python datetime.time objects are always promoted to full datetime types. Once promoted the SQLServer returns the error: 'The data types time and datetime are incompatible in the greater than operator. (402) (SQLExecDirectW)'.
The type promotion occurs in sqlalchemy/dialects/mssql/base.py:268-276. Interestingly, according to the documentation in this file, SQLAlchemy can already determine whether the DATE and TIME types are supported (in SQLServer 2008 or later), and I have confirmed it emits the correct DDL but still treats all bound time values as DATETIMEs anyway. Is this a bug or am I missing something? Many thanks, Simon. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/_30ui_LT8qcJ. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.