Author |
Message
|
udaybhaskar_kv |
Posted: Tue Jun 13, 2017 6:04 am Post subject: CURRENT_TIMESTAMP is not working when passed in PASSTHRU |
|
|
Newbie
Joined: 13 Jun 2017 Posts: 3
|
Hello All,
We are using IIB10 on Linux platform. We are sending CURRENT_TIMESTAMP in PASSTHRU statement in ESQL for a message flow. This is sending to the Oracle database.
We are passing like the below in the query:
CAST(CURRENT_TIMESTAMP AS CHARACTER FORMAT 'yyyy-MM-dd hh:mm:ss:SS')
Error:
line:3899 message:2322.BIPmsgs 'Child SQL exception' , '22018', 0, '[IBM][ODBC Oracle Wire Protocol driver]Invalid character value. Error in parameter 19.
The same code is running fine in WMB7. Any update would be greatly appreciated. Many thanks!  |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 13, 2017 6:17 am Post subject: Re: CURRENT_TIMESTAMP is not working when passed in PASSTHRU |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
udaybhaskar_kv wrote: |
Hello All,
We are using IIB10 on Linux platform. We are sending CURRENT_TIMESTAMP in PASSTHRU statement in ESQL for a message flow. This is sending to the Oracle database.
We are passing like the below in the query:
CAST(CURRENT_TIMESTAMP AS CHARACTER FORMAT 'yyyy-MM-dd hh:mm:ss:SS')
Error:
line:3899 message:2322.BIPmsgs 'Child SQL exception' , '22018', 0, '[IBM][ODBC Oracle Wire Protocol driver]Invalid character value. Error in parameter 19.
The same code is running fine in WMB7. Any update would be greatly appreciated. Many thanks!  |
And you are sure Oracle is expecting the date to be yyyy-MM-dd and not MM-dd-yyyy ??  _________________ MQ & Broker admin |
|
Back to top |
|
 |
udaybhaskar_kv |
Posted: Tue Jun 13, 2017 6:28 am Post subject: |
|
|
Newbie
Joined: 13 Jun 2017 Posts: 3
|
Yes.. The same code is working fine in WMB7 aswell. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 13, 2017 7:43 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I made myself a rule many years ago.
Do not put anything but pre-formed data in a DB operation.
Could you not cast the data to a cHAR before the PASSTHRU? Then with usertrace, you can see all that is going on in the call and importantly the code before it. _________________ 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 |
|
 |
udaybhaskar_kv |
Posted: Tue Jun 13, 2017 9:51 pm Post subject: |
|
|
Newbie
Joined: 13 Jun 2017 Posts: 3
|
Many thanks! You are Right. But when we create the timestamp in a variable and send it across it is working fine. In this way, Broker Server timestamp is send to the Database. In our case, we want to insert the database time stamp itself in the database from broker. So we have to do this in the PASSTHRU itself. |
|
Back to top |
|
 |
|