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 » LIKE statement not working in WMB

Post new topic  Reply to topic
 LIKE statement not working in WMB « View previous topic :: View next topic » 
Author Message
kathir
PostPosted: Thu Jul 18, 2013 10:06 pm    Post subject: LIKE statement not working in WMB Reply with quote

Apprentice

Joined: 12 Sep 2011
Posts: 30

HI,

I am trying to fetch data from database using LIKE statement. It works fine in DB2 but the same query does not work in WMB.

ESQL.

query= passthrough(select col1 from table1 where col1 like '%abc')
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Jul 18, 2013 10:29 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Your command is incorrectly formatted

you need multiple ' character around the %abc part.

[/code]
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kathir
PostPosted: Thu Jul 18, 2013 10:53 pm    Post subject: LIKE clause Reply with quote

Apprentice

Joined: 12 Sep 2011
Posts: 30

Please could you correct the query. I will try with the same.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Jul 19, 2013 12:31 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I have given you some pointers so why don't you try it yourself?

Then if that does not work then come back here and tell us what you have done then we can help you help yourself.

Those of us who answer queries here do have our 'day job' to do as well.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Sat Jul 20, 2013 12:35 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

query= passthrough(select col1 from table1 where col1 like '%abc')
is not proper ESQL.
there is no SET before the variable being set, it does not end with a semicolon AND passthrough is not a valid ESQL function.
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 » LIKE statement not working in WMB
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.