79732466

Date: 2025-08-11 20:07:28
Score: 1
Natty:
Report link

Old chat I know, but it helped me and allowed me to find another "quirk" I guess....

We have Report Builder 10, and it is fine with "LIKE". I use parameters with it to get Starts with or Contains.

In Select statements if you want "Starts with" I use LIKE @Parameter + '%'

But I did discover that to use it for "Contains" instead of "Starts With", I wasn't getting any results with

LIKE '%' + @Parameter + '%' as you would expect to do. I think it may be ok if you wanted text inside a word, but in my case the "Contains" may be second word in a name, after a space.... eg Mt Everest.

I found when I added a second wildcard eg. LIKE '%' +'%' + @Parameter + '%' it worked!

Reasons:
  • Whitelisted phrase (-1): it worked
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Parameter
  • User mentioned (0): @Parameter
  • User mentioned (0): @Parameter
  • Low reputation (1):
Posted by: JP1