>I just found out that we cannot use the UPPER() function in a WHERE clause of the SQL command when searching on a text field. So far I always want to find the string no matter the casing. But, what if I would like to search a text field with case sensitive. Because a UPPER() is done automatically, what would then be the options to negotiate with that?
I guess you didn't read my SQL Column published in UtMag a while ago. :)
DECLARE @TestCS TABLE (Col1 text, pk int IDENTITY );
INSERT INTO @TestCS VALUES('Test')
INSERT INTO @TestCS VALUES('TEST')
INSERT INTO @TestCS VALUES('test')
INSERT INTO @TestCS VALUES('TeSt')
INSERT INTO @TestCS VALUES('Test')
SELECT * FROM @TestCS
WHERE col1 COLLATE SQL_Latin1_General_CP1_CS_AS LIKE '%Test%'
--sb--