Uploaded image for project: 'Apache MetaModel'
  1. Apache MetaModel
  2. METAMODEL-1112

Where clauses with Date related fields fail on SQL Server

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.4
    • Fix Version/s: None
    • Environment:
      Running on Java 8 web server using Jersey to provide a REST API. DB is running on SQL Server 2012.
    • Flags:
      Important

      Description

      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

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/metamodel/pull/124
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 <mirza.harris@gmail.com>
          Date: 2016-08-15T10:47:20Z

          Added code to remove TIMESTAMP tokens from SQLServer queries


          Show
          githubbot ASF GitHub Bot added a comment - 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 <mirza.harris@gmail.com> Date: 2016-08-15T10:47:20Z Added code to remove TIMESTAMP tokens from SQLServer queries

            People

            • Assignee:
              Unassigned
              Reporter:
              mirza.harris@gmail.com Harris Mirza
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development