6
Answers

Sort the Alphanumeric Column in SQL

Anuja Godse

Anuja Godse

5y
2.9k
1

I want sort the below Alphanumeric Column in SQL Server.

Column A

SP-SS-2
SP-FAB-8
WD-1
WD-4A
WD-11
WD-10
WD-2
WD-20

I want sorted by ascending order Output is as follows:

Column A

SP-FAB-8
SP-SS-2
WD-1
WD-2
WD-4A
WD-10
WD-11
WD-20

Any tricks to make it sort properly?

Answers (6)