Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Using LIKE in sql
ianlufc
Hey Guys
Something that seems so easy is catching me out
I want to return details to my data set based on a like sql statement but cant get the syntax
select * from table where
TAGS like '%?%'
i want something like above where parameter is bwtween the percenatge signs
any help appreciated
Thanks
Find more posts tagged with
Comments
ianlufc
Anybody????
Just to clarify i put the above sql in the edit for the data set,
can you do this for a like statement?
Been looking through the forums and there is alot of mention about putting it in the script tab just not sure about syntax as iv never done it
bhanley
I built a sample for you that takes care of the LIKE clause. See this DevShare item. <br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/864-use-a-like-operator-in-a-query/#description'>Use
a LIKE operator in a query - Designs & Code - BIRT Exchange</a><br />
<br />
The problem you hit has to do with how the engine substitutes the parameter value into the query at run-time. The DevShare description goes into some detail.<br />
<br />
Good Luck!
ianlufc
Hey bhanley
It worked a treat thanks a million for your help.
I didnt know that you didnt need to set a parameter in the data set if you use the scripting way of accesing it....
I also didnt know the syntax for BIRT so you helped alot, i had a feeling it was about wildcards but didnt know how to get around it
Thanks Again