Anuja Godse

Anuja Godse

  • NA
  • 27
  • 6.3k

Sort the Alphanumeric Column in SQL

Nov 1 2019 11:34 PM

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)