[Sqlalchemy-tickets] Issue #4282: Datepart wrong first parameter on MSSQL engine (Re-raised) (zzzee
Brought to you by:
zzzeek
From: Umberto P. <iss...@bi...> - 2018-06-20 11:07:52
|
New issue 4282: Datepart wrong first parameter on MSSQL engine (Re-raised) https://bitbucket.org/zzzeek/sqlalchemy/issues/4282/datepart-wrong-first-parameter-on-mssql Umberto Prim: Stumbled upon the same error as in issue [3624](https://bitbucket.org/zzzeek/sqlalchemy/issues/3624) ``` #!python ProgrammingError: (pyodbc.ProgrammingError) ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid parameter 1 specified for datepart ``` using: ``` #!python func.datepart('ISO_WEEK', table_obj.c.Column) ``` With `mssql` with `pyodbc` and `sqlalchemy` version `1.2.8` While with textual construct: ``` #!python text('datepart(ISO_WEEK, tbl_name.Column)') ``` it works as expected. |