Hugo Kornelis (5/25/2010)
malleswarareddy_m (5/24/2010)
hi ,like operator will search for _ only.and return any characters. then it does not return any rows.because i worked many times using like operator.but if we use '%_%' or '%_' or '_%'. then i think it will display the number of characters.but directly with like '_' it will not return the rows.and also i extecuted the above query but it will not return any rows.
Did you try setting the collation to CZECH_CI_AS, as Honza indicated in the explanation?
Certain Nordic collations will also consider some two-character combinations as a single character, and I expect German collations to do that as well (e.g. ss = ß, ue = ü, etc)
Hi I checked with different collations
with two queries
select string from #t where string COLLATE CZECH_CI_AS like '_'
the above you have given returns gives
CH
Ch
ch
¢h
four rows.
But when i using my default collation using this query
select string from #t where string COLLATE SQL_Latin1_General_CP1_CI_AS like '_'
It does not return any results.I got wrong.Because I did not checked on different collations.You answer is correct.The Result depens upon collations.Thanks for posting good answer.
learned some thing new for the day.
Malleswarareddy
I.T.Analyst
MCITP(70-451)