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 » RPAD Equivalent in ESQL

Post new topic  Reply to topic
 RPAD Equivalent in ESQL « View previous topic :: View next topic » 
Author Message
RookieMQ
PostPosted: Sat Feb 02, 2008 5:31 pm    Post subject: RPAD Equivalent in ESQL Reply with quote

Newbie

Joined: 02 Feb 2008
Posts: 4

Hi,

Is there a function I can use in ESQL which is equivalent to RPAD. I am trying to add 0 at the end of the string if the length of the string is less than 8. The below code is giving an error " Invalid or incompatible data types for '+' operator" . Thanks in advance for your help.

DECLARE totalLength INT 8;
DECLARE actualLength INT 1;

SET DetailQTY = Data.ItemQuantity;
SET actualLength = LENGTH(DetailQTY);
WHILE actualLength < totalLength DO
DetailQTY = DetailQTY + cast(0 AS CHAR);
END WHILE;
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Feb 02, 2008 8:15 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, string concatenation in esql is |, not +.

Look at OVERLAY.
_________________
I am *not* the model of the modern major general.
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 » RPAD Equivalent in ESQL
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.