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 » Invalid character error in message flow when casting value..

Post new topic  Reply to topic
 Invalid character error in message flow when casting value.. « View previous topic :: View next topic » 
Author Message
tucanen
PostPosted: Sat Sep 10, 2005 4:20 pm    Post subject: Invalid character error in message flow when casting value.. Reply with quote

Novice

Joined: 27 Jun 2005
Posts: 22
Location: Sweden

Hi,

My message flow queries an Oracle 9.2.0 database (odbc data source) for some information. One of the columns in the SQL select statement is of the data type NUMBER in the oracle database.

When the query returns the value -1,6648E+2 and I try to the following, it fails with a bip2592 error (Invalid Characters):

myVar = CAST(myRes.a As DECIMAL(16,4));

When I try the same SQL statement in SQLPlus, it returns the value -166,48.

Does anyone have a clue about how to solve this problem?
I have tried putting a TO_CHAR and TO_NUMBER conversion in the SQL statement, but it made difference...

WBIMB 5.0 and Oracle 9.2.0 running on Win XP.

Regards,

contact admin
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Sun Sep 11, 2005 9:34 pm    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Hi,
I guess that it's due to the comma (-166,4 in the value that is returned by your select statement:
tucanen wrote:
Quote:
When I try the same SQL statement in SQLPlus, it returns the value -166,48.


Try to replace the comma(,) with period(.) so that your value looks like
-166.48. Then try to cast it to decimal.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
tucanen
PostPosted: Tue Sep 13, 2005 9:16 am    Post subject: Reply with quote

Novice

Joined: 27 Jun 2005
Posts: 22
Location: Sweden

Hi,

Thank you for helping!

Actually, I solved it by doing the following to_char conversation in the select statement:

TO_CHAR( myTable.myColumn, 'FM9999999999990.0000' )

So you were right

Thanks.

/ contact admin
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Tue Sep 13, 2005 8:54 pm    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Can you please post the query? Which database you are using? Did you use PASSTHRU to fire the SELECT query or you did it through ESQL code?
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Invalid character error in message flow when casting value..
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.