Can anyone explain the rules for how a wildcard character range, eg [A-D], works with a case-sensitive collation?
I would have thought the following
You need a binary collation as indicated in Md. Elias Hossain's answer.
The explanation is that ranges in the pattern syntax work off Collation sort order rules.
From BOL
In range searches, the characters included in the range may vary depending on the sorting rules of the collation.
So
;WITH T(C) AS
(
SELECT 'A' UNION ALL
SELECT 'B' UNION ALL
SELECT 'C' UNION ALL
SELECT 'D' UNION ALL
select 'a' union all
select 'b' union all
select 'c' union all
select 'd'
)
SELECT *
FROM T
ORDER BY C COLLATE Latin1_General_CS_AS
Returns
C
----
a
A
b
B
c
C
d
D
So the range A-D
excludes a
but includes the other 3 lower case letters under a CS
collation.