March 25, 2014 at 12:40 pm
Sorry no DDL, but can some one still offer help with syntax. I just need to have result where the field countername begins with a % (as percent) character. The below returns everything having word 'usage', 'idle', 'processor' , thereby returning more rows than I need.
How to modify this so SQL knows I'm looking only for values starting with %?
where countername like '%usage%'
or countername like '%idle%'
or countername like '%processor%'
March 25, 2014 at 12:50 pm
Something like this?
where countername like '[%]usage%'
March 25, 2014 at 12:52 pm
this what worked
where countername like '%[%]%usage%'
or countername like '%[%]%idle%'
or countername like '%[%]%processor%'
March 25, 2014 at 12:59 pm
That will return all countername values containing a percentage sign before the word, not only the ones that start with the percentage sign.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply