|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unable to insert ESQL Current_Timestamp into DB2 table |
« View previous topic :: View next topic » |
Author |
Message
|
madhu36r |
Posted: Mon Jul 01, 2013 7:55 am Post subject: Unable to insert ESQL Current_Timestamp into DB2 table |
|
|
Newbie
Joined: 28 Nov 2006 Posts: 5
|
Hi All,
I am working with WMB6.1 on mainframe.
I am unable to insert ESQL CURRENT_TIMESTAMP into CURRENT TIMESTAMP of DB2 table.
I tried to map ESQL TIMESTAMP to DB2 Time stamp.
DECLARE myst CHARACTER 'SELECT CURRENT TIMESTAMP from SYSIBM.SYSDUMMY1 WITH UR';
SET Environment.Variables.myCurrTsp[1] = PASSTHRU(myst);
SET TEST_TS1 = CAST( Environment.Variables.myCurrTsp[1].*[1] AS TIMESTAMP);
I am getting the following exception. Please help me:
Text:CHARACTER:{DB2 FOR OS/390}{ODBC DRIVER}{DSN09015}
DSNT408I SQLCODE = -180, ERROR: THE DATE, TIME, OR TIMESTAMP VALUE *N IS
INVALID
DSNT418I SQLSTATE = 22007 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXRIHB SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -6805 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFE56B' X'00000000' X'00000000' X'FFFFFFFF'
X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION
ERRLOC=1:13:2 |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 01, 2013 8:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
madhu36r |
Posted: Mon Jul 01, 2013 8:24 am Post subject: |
|
|
Newbie
Joined: 28 Nov 2006 Posts: 5
|
Removed the CAST, still got the same exception
SET TEST_TS1 = Environment.Variables.myCurrTsp[1].*[1] ;
Text:CHARACTER:{DB2 FOR OS/390}{ODBC DRIVER}{DSN09015}
DSNT408I SQLCODE = -180, ERROR: THE DATE, TIME, OR TIMESTAMP VALUE *N IS
INVALID
DSNT418I SQLSTATE = 22007 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXRIHB SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -6805 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFE56B' X'00000000' X'00000000' X'FFFFFFFF'
X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION
ERRLOC=1:13:2 |
|
Back to top |
|
 |
madhu36r |
Posted: Mon Jul 01, 2013 11:06 am Post subject: [SOLVED] ESQL TIMESTAMP is compatible with DB2 |
|
|
Newbie
Joined: 28 Nov 2006 Posts: 5
|
HI ALL,
I have a typo in the character representation of a TIMESTAMP value of a column, so I am getting the above exception.
You dod not need to CAST to any character or timestamp.
The ESQL TIMESTAMP is compatible with DB2 CURRENT TIMESTAMP.
I directly passed CURRENT_TIMESTAMP.
Thanks for your support. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|