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 » Version 5 CAST to Decimal truncates Leading zeros

Post new topic  Reply to topic
 Version 5 CAST to Decimal truncates Leading zeros « View previous topic :: View next topic » 
Author Message
Balraj Muthupandiyan
PostPosted: Tue Mar 08, 2005 2:41 pm    Post subject: Version 5 CAST to Decimal truncates Leading zeros Reply with quote

Newbie

Joined: 08 Mar 2005
Posts: 3

Hello:
When I used the following statement in Version 2 the result was 00321.4560, where the value of x=321.456.
CAST(x AS DECIMAL(10,4))

But when I used the same statment in Version 5 the result was 321.4560
The two leading zeros were truncated.

I need the leading zeros, do you guys have any solution?

Thanks in advance for your help.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Mar 08, 2005 3:11 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I remember some discussion about this in the past on this forum...

Try searching for CAST or DECIMAL or some such.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PGoodhart
PostPosted: Wed Mar 09, 2005 5:02 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2004
Posts: 278
Location: Harrisburg PA

Don't expect IBM to change this one back either, that data type doesn't have leading zeros anymore.
I assume that this is a final value (No more calculations?) so you could cast it to character and add the zeros based on the length.
_________________
Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin


Last edited by PGoodhart on Wed Mar 09, 2005 8:15 am; edited 1 time in total
Back to top
View user's profile Send private message
Balraj Muthupandiyan
PostPosted: Wed Mar 09, 2005 7:23 am    Post subject: Reply with quote

Newbie

Joined: 08 Mar 2005
Posts: 3

Thank you for the reponses.
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 » Version 5 CAST to Decimal truncates Leading zeros
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.