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 » Conversion Problem

Post new topic  Reply to topic
 Conversion Problem « View previous topic :: View next topic » 
Author Message
satyasheel15
PostPosted: Sun May 18, 2003 9:18 pm    Post subject: Conversion Problem Reply with quote

Voyager

Joined: 04 Mar 2003
Posts: 86

Problem:

I am working in a message Set where the Input Values is String with fixed length = 18.

And I want the output as converted into DECIMAL(14,4).

For example,

my input value is: 221145678905678567
and I want my output as : 22114567890567,8567

Please advise.

Regards Always

Satyasheel
Back to top
View user's profile Send private message Send e-mail MSN Messenger
shalabh1976
PostPosted: Mon May 19, 2003 8:39 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

CAST(element as DECIMAL(14,4))

should do it
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kirani
PostPosted: Tue May 20, 2003 7:42 pm    Post subject: Re: Conversion Problem Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

satyasheel15 wrote:

For example,
my input value is: 221145678905678567
and I want my output as : 22114567890567,8567

It seems you are expecting output data into STRING format. If so, try this:
Code:

DECLARE TMP CHAR;
SET TMP = SUBSTRING(inputvalue FROM 1 FOR 14) || ',' || SUBSTRING(inputvalue FROM 15 FOR 4);

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Conversion Problem
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.