Results 1 to 4 of 4

Thread: Error converting data type DBTYPE_DBTIMESTAMP to datetime.

  1. #1
    Join Date
    Jul 2005
    Posts
    4

    Error converting data type DBTYPE_DBTIMESTAMP to datetime.

    sorry i am not sure where i have to post this.. but i also got the same erorr


    Error converting data type DBTYPE_DBTIMESTAMP to datetime.

    with my sql something like this

    select DUE_DATE_END_OPER from openquery
    (MARS_PGS, 'select DUE_DATE_END_OPER from PG8_PROD_0_REPORT.F_HVE_APO_ROUTE')

    could somebody help me explain?or any solution? as i am not good in sql..
    thank you

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Tried this?

    select convert(datetime, DUE_DATE_END_OPER) from openquery
    (MARS_PGS, 'select DUE_DATE_END_OPER from PG8_PROD_0_REPORT.F_HVE_APO_ROUTE')

  3. #3
    Join Date
    Jan 2004
    Posts
    52
    Hi -

    I had similar issue a while back, and Mak was able to assist me.

    Please see below thread:

    http://forums.databasejournal.com/sh...ad.php?t=34278

    Good luck.
    LS

  4. #4
    Join Date
    Jul 2005
    Posts
    4

    thanks..~

    thanks guy.... but i got the ans for it already....


    to rmiao....
    ur coding seems still got error on it..~
    hen i put it and analyst it,.. error coming ...

    Server: Msg 8114, Level 16, State 8, Line 1
    Error converting data type DBTYPE_DBTIMESTAMP to datetime.


    to anam...
    thanks for the link/... butsince i got the ans...~ so i din go there but for sure i will go there to have a look on it.. thanks..


    oo btw.. the coding that manage t o run should be...


    select *
    from openquery(MARS_PGS, 'select TO_CHAR(DUE_DATE_END_OPER) FormattedDate from PG8_PROD_0_REPORT.F_HVE_APO_ROUTE') derived
    where isdate(FormattedDate)=0




    thanks guy..~

Posting Permissions

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