Hi all
I have a need to use either CHARINDEX or a LIKE pattern to find the occurrence of a single char in a field, within a WHERE clause.
e.g.
WHERE field1 like '%X%'
vs.
WHERE CHARINDEX('X', field1) > 0
Which would be more efficient? I've gone for the CHARINDEX so far.
Thanks
Julian
I have a need to use either CHARINDEX or a LIKE pattern to find the occurrence of a single char in a field, within a WHERE clause.
e.g.
WHERE field1 like '%X%'
vs.
WHERE CHARINDEX('X', field1) > 0
Which would be more efficient? I've gone for the CHARINDEX so far.
Thanks
Julian