|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SQL0180N - Issue with InputRoot.MQMD.PutDate,PutTime ? |
« View previous topic :: View next topic » |
Author |
Message
|
akidase |
Posted: Mon May 30, 2011 11:16 pm Post subject: SQL0180N - Issue with InputRoot.MQMD.PutDate,PutTime ? |
|
|
Centurion
Joined: 10 Jan 2011 Posts: 124
|
There are few cases where we are getting values in MqTimeStamp as below.
Code: |
LogTimeStamp: 2011-05-26 01:33:19.013
MqTimeStamp: 2011-05-26 08:33:19' |
The code for creating it is
Code: |
REPLACE(substring(CAST(InputRoot.MQMD.PutDate as Char) from 7 for 10) || ' ' || substring(CAST(InputRoot.MQMD.PutTime as char) from 10 for 12),'''');
|
MQMD_TIMESTAMP Column in the DB is specified with DataType as TimeStamp, Length as 10.
While inserting into DB , it is failing with the exception
Code: |
[IBM][CLI Driver][DB2/AIX64] SQL0180N The syntax of the string representation of a datetime value is incorrect. |
Please let us know the scenario where in we get such values from Broker. |
|
Back to top |
|
 |
Gemz |
Posted: Tue May 31, 2011 3:01 am Post subject: |
|
|
 Centurion
Joined: 14 Jan 2008 Posts: 124
|
Why are you trying to store the Character datatype value in Timestamp datatype.
Either Cast the Values to Timestamp format or change the Datatype in DB to Varchar _________________ GemZ
"An expert is one who knows more and more about less and less until he knows absolutely everything about nothing...." |
|
Back to top |
|
 |
akidase |
Posted: Sun Jun 05, 2011 10:11 pm Post subject: |
|
|
Centurion
Joined: 10 Jan 2011 Posts: 124
|
Code: |
SET curTime = OVERLAY(SUBSTRING(replace( cast(CURRENT_TIMESTAMP as char),':','.') FROM 12 FOR 26) PLACING '-' FROM 11 fOR 1) ;
--Fix for Defect 4225(removes 's in the date string,if any.
SET curTime= replace(curTime,'''','');
|
There are some cases wherein we are getting
Code: |
2011-03-31-00.09.35.[b]873[/b] |
(only 3 digits at the end) instead of 6 digits at the end
Code: |
2011-03-31-00.09.35.[b]873123[/b] |
|
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jun 05, 2011 11:15 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
This could be because the trailing zeros are being omitted.
You can possibly solve this with the OVERLAY function
IMHO, this is a well known (at least in Grey haired/beared WMQ App programming type) feature.
 _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
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
|
|
|
|