Results 1 to 4 of 4

Thread: Error: converting data type DBTYPE_DBTIMESTAMP to datetime

  1. #1
    Join Date
    Dec 2002
    Posts
    50

    Error: converting data type DBTYPE_DBTIMESTAMP to datetime

    I am trying to query a DB2 table from SQL using the follwonig statemet:

    Select * from openquery(DB2C1,'Select * from DMA.V_FCD')

    when I run above statement, I get:

    Server: Msg 8114, Level 16, State 8, Line 1

    Error converting data type DBTYPE_DBTIMESTAMP to datetime.

    Thanks.
    LS

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    try this

    Select * from openquery(DB2C1,'Select COL1, DATE(TS_Column), TIME(TS_Column) from DMA.V_FCD')


    Refer:
    http://www.cs.ucla.edu/classes/winte...1/DB2Time.html

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    When you pull data from different database, date time always pose a problem. So you have to convert the date to acceptable format in sql server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •