I’m looking for a collation that sorts by ASCII but case insensitive but I am not having any luck finding one. To be explicit, the order I’m looking for is…
!
”
#
$
%
&
‘
(
)
*
+
,
–
.
/
0
1
2
3
4
5
6
7
8
9
:
;
?
@
[
]
^
_
`
A
a
B
b
C
c
D
d
E
e
F
f
G
g
H
h
I
i
J
j
K
k
L
l
M
m
N
n
O
o
P
p
Q
q
R
r
S
s
T
t
U
u
V
v
W
w
X
x
Y
y
Z
z
{
|
}
~
This would also seem to fit into (for this set of characters) Windows Code Page 1252 but I have to admit, I’m not expert of code pages and could be reading this wrong.
https://en.wikipedia.org/wiki/Windows-1252
I’ve tried a number of collations in queries to test them out…
SQL_Latin1_General_CP1_CI_AS
SQL_Latin1_General_CP850_CI_AI
SQL_Latin1_General_CP850_CS_AS
SQL_Latin1_General_CP850_CS_AS
SQL_Latin1_General_CP437_CI_AS
But they are all getting similar results for this set and none of them are what I’m looking for. Some of the Binary sorts (ie SQL_Latin1_General_CP850_BIN) come close but they aren’t case insensitive.
I can do it through a query like…
SELECT char_test FROM code_page_test order by ASCII(lower (char_test))
but is there a collation setting to get this sort order?
Thanks.
sd. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.