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 » Question about CAST AS DECIMAL WITH FORMAT

Post new topic  Reply to topic
 Question about CAST AS DECIMAL WITH FORMAT « View previous topic :: View next topic » 
Author Message
jamesyu
PostPosted: Wed Aug 12, 2009 11:10 am    Post subject: Question about CAST AS DECIMAL WITH FORMAT Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

Hi,

I use WMB 6.0 and have a piece of code like below:

declare x decimal;
set x = cast('0004' as decimal format '#0.000');

It always produces the output like:
x = 4

But the business needs to see X = 4.000.

How can I make this happen WITH casting function?

Thanks,
James
Back to top
View user's profile Send private message
Luke
PostPosted: Wed Aug 12, 2009 12:55 pm    Post subject: Reply with quote

Centurion

Joined: 10 Nov 2008
Posts: 128
Location: UK

Hi,

Think you're a bit confused about data types here. Decimal is an internal kind of representation of a number which is unlikely to be in a nice format for presentation. If you want to format it, you'd want to cast it in to a string ...

Read the relevant infocenter bit again with this in mind and you should be able to figure it out.

Cheers
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 » Question about CAST AS DECIMAL WITH FORMAT
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.