Cool solution Mark. Not one I would have thought of. I'd have done something like this:
DECLARE @string VARCHAR(10)
SET @string = 'Sarat'
SELECT
CASE
WHEN @string LIKE '%s%' COLLATE Latin1_General_CS_AI THEN 'Lower Case s found'
WHEN @string LIKE '%S%' COLLATE Latin1_General_CS_AI THEN 'Upper Case S found'
ELSE 'No S found'
END
but I like yours better.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question