You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/15 10:54:22 UTC

[jira] [Commented] (METAMODEL-1112) Where clauses with Date related fields fail on SQL Server

    [ https://issues.apache.org/jira/browse/METAMODEL-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15420841#comment-15420841 ] 

ASF GitHub Bot commented on METAMODEL-1112:
-------------------------------------------

GitHub user olafgarten opened a pull request:

    https://github.com/apache/metamodel/pull/124

    Added code to remove TIMESTAMP tokens from SQLServer queries

    SQL Server doesn't allow for the TIMESTAMP token in where clauses.
    
    Related to JIRA Issue METAMODEL-1112

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/olafgarten/metamodel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/124.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #124
    
----
commit 216dd08ce5113e2e14bb3a15765491755cbba6f5
Author: olafgarten <mi...@gmail.com>
Date:   2016-08-15T10:47:20Z

    Added code to remove TIMESTAMP tokens from SQLServer queries

----


> Where clauses with Date related fields fail on SQL Server
> ---------------------------------------------------------
>
>                 Key: METAMODEL-1112
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1112
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.5.4
>         Environment: Running on Java 8 web server using Jersey to provide a REST API. DB is running on SQL Server 2012.
>            Reporter: Harris Mirza
>              Labels: datetime, sql, sqlserver
>
> Hi, I noticed that when converting a query to SQL and using a condition that includes a date/time field the SQL doesn't run on SQL Server as it adds 'TIMESTAMP' before the value we are comparing. This is invalid syntax and I am not sure why this is added.
> Thanks,
> Harris Mirza



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)