Hi,

I am using the following query in my application. This application is using
DB2, Postgres, Oracle and MSSQL databases.
But the following is not being executed in MSSQL saying* Incorrect syntax
near '2014-05-26 16:02:45'.*

*UPDATE <Table name> SET <column name>=? WHERE (<timestamp column> <
TIMESTAMP '2014-05-26 16:02:45')*

I am creating this query using FilterItem.
After modifying the query with addition of CAST in the query, I am able to
execute the following query in MSSQL client -

*UPDATE <Table name> SET <column name>=? WHERE (<timestamp
column> < CAST('2014-05-26 16:02:45' AS DATETIME))*

*I debugged the code and found that
in org.eobjects.metamodel.util.FormatHelper.formatSqlTime(ColumnType, Date,
boolean, String, String), *we are appending this extra TIMESTAMP
as typePrefix in the query.

Am I missing something or the Metamodel is not generating query correctly
compatible for MSSQL.
Please provide your input.



Thanks,
Balendra

Reply via email to