ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » [ODBC Oracle Wire Protocol driver]String data, right truncat

Post new topic  Reply to topic
 [ODBC Oracle Wire Protocol driver]String data, right truncat « View previous topic :: View next topic » 
Author Message
mzm.shan
PostPosted: Thu Sep 26, 2013 9:34 pm    Post subject: [ODBC Oracle Wire Protocol driver]String data, right truncat Reply with quote

Apprentice

Joined: 25 Aug 2013
Posts: 39

ERROR:
[ODBC Oracle Wire Protocol driver]String data, right truncated. Error in parameter 1.

Following is the TOAD output of an ORACLE DATE field.

TL_SYS_TIME

9/24/2013 9:19:05 PM
9/25/2013 11:10:00 AM
9/25/2013 11:27:06 AM
9/25/2013 11:25:30 AM
9/24/2013 11:01:04 PM

i have esql written with the following code that gives me the error..

select t.tl_sys_time FROM Database.iris.tlog_view as t WHERE t.tl_sys_time >= dateExe


where... "dateExe" is 2013-09-27 10:29:18.315 by

SET dateExe = (CURRENT_TIMESTAMP - CAST('15' AS INTERVAL SECOND));
Back to top
View user's profile Send private message
dogorsy
PostPosted: Thu Sep 26, 2013 9:46 pm    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

you have not specified what data type dateExe is.

Code:
where... "dateExe" is 2013-09-27 10:29:18.315 by

 SET dateExe = (CURRENT_TIMESTAMP - CAST('15' AS INTERVAL SECOND));


As in a previous post, you need to read about data types and the CAST function.
Please read "Using numeric operators with datetime values" in the Infocenter. It contains examples
Back to top
View user's profile Send private message
mzm.shan
PostPosted: Thu Sep 26, 2013 11:40 pm    Post subject: Reply with quote

Apprentice

Joined: 25 Aug 2013
Posts: 39

its
DECLARE dateExe TIMESTAMP;
Back to top
View user's profile Send private message
dogorsy
PostPosted: Thu Sep 26, 2013 11:44 pm    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

mzm.shan wrote:
its
DECLARE dateExe TIMESTAMP;


in that case, why you say its value is "2013-09-27 10:29:18.315" ? it probably is " TIMESTAMP '2013-09-27 10:29:18.315' "
Have you run a user trace to see what value is being assigned to it ?

You need to learn to debug your own code. Try a few things. And run user trace to understand what is going on.
For example,
1- remove the WHERE clause from your select. Is that working ?
2- set dateExe = CURRENT_TIMESTAMP and select where all the dates are before that timestamp. Is that working ?. etc
The user trace will give you a lot of useful information. Read it and learn.
you will see in the trace that the CAST is unnecessary, you can code directly
Code:

  SET dateExe = CURRENT_TIMESTAMP - INTERVAL '15' SECOND;
Back to top
View user's profile Send private message
mzm.shan
PostPosted: Fri Sep 27, 2013 1:33 am    Post subject: Reply with quote

Apprentice

Joined: 25 Aug 2013
Posts: 39

i am watching this value in debug mode in Toolkit.

The query is correct beacue it runs fine with other field filters..
I tried the following as well but didnt work and gave same error.

do i have to cast it? if yes then what should be the FORMAT patteren that works with this particular oracle date field.


SET OutputRoot.XMLNSC.Data.abcd[] = (select t.tl_sys_time
FROM Database.iris.tlog_view as t
WHERE t.tl_sys_time = CURRENT_TIMESTAMP
);


i am sory if it is a dump question as i am a new bee in WMB and esql.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Fri Sep 27, 2013 2:54 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

mzm.shan wrote:
The query is correct beacue it runs fine with other field filters..

Raise a PMR with IBM then.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Sep 27, 2013 7:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It would help to see the full error message, including the BIP number.

It would help to confirm that you are using the DataDirect ODBC Driver for Oracle and not using an Oracle native ODBC driver.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » [ODBC Oracle Wire Protocol driver]String data, right truncat
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.