Microsoft
Software
Hardware
Network
Question : CHARINDEX whole word match
I'm building SQL stored procedure logic that utilizes the "CHARINDEX" function. I'm trying to make CHARINDEX return only whole word matches. Such as:
A) CHARINDEX('fart', greasyFart) = 0
B) CHARINDEX('fart', 'greasy Fart) = 8
C) CHARINDEX('fart', 'greasy fart') = 8
Is this possible or am I attempting something that business logic should work out before SQL?
Answer : CHARINDEX whole word match
its possible, you can also use the PATINDEX
Random Solutions
Import Monthly data from vendor with items sales qty that changes
Copy/Paste and sum total in excel
Automatically rename an Excel worksheet with previous days date, excluding weekends
How do I programmatically set the recordsource in a subreport?
SQL datetime issue: The following 2 sections of code produce different results.
SharePoint: Error Moving File or Folder Cannot Read from Source File or Disk
How to recover moved files and deleted files from Windows machine
Creative SB0460 - Windows 7
can disc stuck at stage 2 of 3
Excel: how can i obtain the cross product of concatenating two columns