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
Retrieving Outlook Archive items with attachments
VB.net program fails when run from a network drive
Convert hyperlinks from '=HYPERLINK()' to 'embedded' links
Windows 7" BSOD "UNEXPECTED_KERNEL_MODE_TR<wbr />AP"
Excel 2007: Use SUMPRODUCT in a pivot table
Internet Explorer opens a Blank Page
Exchage Error SPAM question.
set Focus in a GridView
Use of CrossTab query?
Parent/Child relationship with child needing 2 parents