ODBC Timestamp in DTS Import

  • I am importing data via an ODBC connection - an AR System ODBC driver specifically.

    I am trying to constrain the import using a query, specifically by date. SQL Server documentation states that an ODBC Timestamp must be used. See documentation here: http://msdn2.microsoft.com/en-us/library/ms190234.

    So my query looks something like:

    select "AR_Table1"."Record_ID",

    "AR_Table1"."Status",

    "AR_Table1"."Create_Date"

    from "AR_Table1"

    where "AR_Table1"."Create_Date" > {ts '2006-01-01 12:00:00'}

    However, I would like to constrain the data to just the previous day using function, instead of a specific date. When I use anything but the "ts" syntax, I get an error. Depending on the type of function I use, the error messages are:

    "Expected lexical element not found: identifier". - This is when I constrain using GETDATE() - 1 

    "Unexpected extra token" - This is when I use a dateadd function

    Please see the screenshots of the attached files for clarification.

    Error:

    Parse:

    Does anyone know of a way to constrain an import through an ODBC connection without using the ODBC timestamp and a specific date?

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply