July 24, 2007 at 9:45 am
This is really wierd and I hope someone can shed some light -
Why does doing this pattern search hit on the lower case 'a'?
SELECT PATINDEX ('%[¾-À]%', 'abcdefghijk')
Same this as doing:
declare @Pattern varchar(250)
set @Pattern = '%['+char(190)+'-'+char(192)+']%'
SELECT PATINDEX (@Pattern, 'abcdefghijk')
Now if I look for these characters individually, it does not find anything..Is this an MS bug?
Any help is appreaciated, thanks..
July 24, 2007 at 10:31 am
July 24, 2007 at 11:18 am
sorry, I needed a quick answer so I can get out a script today - won't do it again..
July 25, 2007 at 9:15 am
You need to specify a collation that distinguishes between upper and lower case, such as...
declare @Pattern varchar(250)
set @Pattern = '%['+char(190)+'-'+char(192)+']%'
SELECT PATINDEX (@Pattern collate Latin1_General_BIN,'abcdefghijk')
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy