July 31, 2008 at 12:59 pm
I am new to sqlserver .If a string is given like this 'NEONDMEMDSAND' and search for the strings where 4th to 6th characters are 'NDM'.How would I do that. I know like just '%' checks the string irrespective of the number of characters in the beginning . As like '%NDM%'
July 31, 2008 at 1:03 pm
Like this:
Select * from TABLE1 Where COL1 Like '___NDM%'
(note: these '___' are 3 underscores)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
July 31, 2008 at 1:39 pm
Thanks a lot !!
July 31, 2008 at 2:07 pm
Glad I could help.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply