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 » Get some inputs/ideas on seperating integer & decimal pa

Post new topic  Reply to topic
 Get some inputs/ideas on seperating integer & decimal pa « View previous topic :: View next topic » 
Author Message
itsme
PostPosted: Thu Apr 07, 2005 1:53 pm    Post subject: Get some inputs/ideas on seperating integer & decimal pa Reply with quote

Newbie

Joined: 07 Apr 2005
Posts: 1

Guyz ...

just would like to know what do you think would be the best way to get integer & decimal part of a FLOAT field.

say If my XML input is
<Tag1>123123.1234</Tag1>

I would like my output to have ...
<First>123123</First>
<Second>1234</Second>

All the inbuilt ESQL functions & CAST specifications either round it up or down ....

What are other ideas ???
Back to top
View user's profile Send private message
Ramphart
PostPosted: Fri Apr 08, 2005 12:50 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

Use Substring
_________________
Applications Architect


Last edited by Ramphart on Fri Apr 08, 2005 5:02 am; edited 1 time in total
Back to top
View user's profile Send private message
dipankar
PostPosted: Fri Apr 08, 2005 4:57 am    Post subject: cery simple Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

you simply can use SUBSTRING function.
See the following ESQL, it may be needful to you
DECLARE IN_Point INTEGER;
SET IN_Point = POSITION( '.' IN InputBody.Tag1);
SET OutputRoot.XML.First = SUBSTRING(InputBody.Tag1 FROM 1 FOR IN_Point - 1);
SET OutputRoot.XML.Second = SUBSTRING(InputBody.Tag1 FROM IN_Point + 1);
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 » Get some inputs/ideas on seperating integer & decimal pa
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.