Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Error converting data type DBTYPE_DBTIMESTAMP to d

Author  Topic 

alejo46
Posting Yak Master

157 Posts

Posted - 2010-11-26 : 12:16:45
Good afternoon:

There is a process that somestimes fails with the error:

Error converting data type DBTYPE_DBTIMESTAMP to datetime

The weird thing is that i restart the instance in sqlserver 2000 and execute once again the procedure and it works OK.

Thr problem is i cannot restart the instance everyday because there are other procedures running, and i think this is a temporary solution. but i cannot find out the "root of the problem.". dont know if it is a sqlserver problem.

is there any better solution to tackle the problem from the root?

This a part of the code
PRO_ETL_CARGUE_PS_CATEGORIAS_CARGO_TD 2900, 511188, ''



INSERT INTO DETALLE_PS_CATEGORIAS_CARGO_TD (
COD_CATEGORIA

,MIN_CARGO_REQUERIDO
,ID_CATEGORIA
,DES_CATEGORIA
,FEC_CREACION

,USU_CREACION

,FEC_MODIFICACION

,USU_MODIFICACION )

SELECT COD_CATEGORIA
,MIN_CARGO_REQUERIDO

,ID_CATEGORIA

,FEC_MODIFICACION
,USU_MODIFICACION

FROM OPENQUERY (SCL,'SELECT

TD.COD_CATEGORIA
,TD.ID_CATEGORIA

,TD.DES_CATEGORIA

OM PS_CATEGORIAS_CARGO_TD TD')

(1 row(s) affected)

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

Error converting data type DBTYPE_DBTIMESTAMP to datetime.

Id appreciate your help



dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2010-11-26 : 17:03:55
Can you do a simple select from the source table via OPENQUERY and test the field for validity using isDate()?

Sounds like the source data has some invalid dates in it.




Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-11-27 : 02:48:12
which is your source db?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

alejo46
Posting Yak Master

157 Posts

Posted - 2010-11-30 : 11:38:54
The source db is ORACLE
Go to Top of Page
   

- Advertisement -