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 » String Function Contains Issue

Post new topic  Reply to topic
 String Function Contains Issue « View previous topic :: View next topic » 
Author Message
polydegmon
PostPosted: Fri Nov 16, 2012 6:38 am    Post subject: String Function Contains Issue Reply with quote

Novice

Joined: 07 Oct 2011
Posts: 11

Hi I'm using the CONTAINS function and am experiencing an unexpected result. I have a work around but I'm just wondering if anyone else has experienced this issue.

When I use the CONTAINS function and my search expression contains a blank string, the function will match it to any source expression.

In the code below the contents of the IF statement will always be processed.

Code:

DECLARE TEST_SRCH_EXP CHARACTER;

SET TEST_SRCH_EXP = '';

IF CONTAINS('W,X', TEST_SRCH_EXP) THEN
//Perform Task
END IF;


This is not the result I want, can anyone tell me why this occurs?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Nov 16, 2012 6:39 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

It may not be the result you want, but it is the way the function is designed.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Esa
PostPosted: Fri Nov 16, 2012 6:46 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Any string can contain an unlimited number of empty strings
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 » String Function Contains Issue
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.