July 10, 2006 at 11:14 am
Very much against my will, I have been required to install SQL Server 2000 with case sensitive collation. Now that I’m stuck with that, how do I do a case in-sensitive select on a column?
TIA
~RbH
July 10, 2006 at 11:34 am
Just use the COLLATE keyword. Here's a simulated example...
--data
declare @t table (v varchar(10) collate Latin1_General_BIN)
insert @t
select 'ABC'
--calculation
select * from @t where v = 'abc'
select * from @t where v = 'abc' collate Latin1_General_CI_AI_WS
/*results
v
----------
(0 row(s) affected)
v
----------
ABC
(1 row(s) affected)
*/
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
July 10, 2006 at 1:46 pm
Thanks a million - that works like a charm!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply