Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 12890

How can I convert SQL Server 2008 Timestamp to DB2/iSeries Timestamp?

$
0
0

In DB2/iSeries I have a column that accepts Timestamp value. When I try to insert a timestamp value from the SQL 2008 table and into DB2/iSeries table I recieve the following error message:

OLE DB provider "IBMDA400" for linked server "XXX" returned message "SQL0180: Syntax of date, time, or timestamp value not valid.
Cause . . . . . :   The string representation of a date, time, or timestamp value does not conform to the syntax for the specified or implied data type and format. *N is either the character string constant that is not valid or the column or host variable that contained the string. If the name is *N, then the value is an expression specified in the statement. If the string was found in a host variable, the host variable number is 1. Recovery  . . . :   Ensure that the date, time, or timestamp value conforms to the syntax for the data type it represents. Try the request again.".
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "IBMDA400" for linked server "XXX" could not INSERT INTO table "[IBMDA400]".

-----

The SQL timestamp column contains the result in the following format:

2014-04-24 07:39:09.000

And my insert TSQL command is:

INSERT INTO OPENQUERY(XXX, 'Select "TimeOfDeal" from  ABCD.TICKETS')
SELECT TimeOfDeal
FROM  dbo.Tickets
WHERE     DealId = 'ABC123'

I appreciate any help on this issue.


Viewing all articles
Browse latest Browse all 12890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>