Have a look at sample:
DECLARE @tmp TABLE (code VARCHAR(30))
INSERT INTO @tmp (code)
VALUES('13028-2DEW1'),
('13028-2DEW10'),
('13028-2DEW2'),
('13028-2DEW3'),
('13028-2DFB1'),
('13028-2DLW1'),
('13028-2DLW10'),
('13028-2DLW101'),
('13028-2DLW2'),
('13028-2DLW7')
SELECT code, LEFT(code,10) as begpart, CONVERT(INT, RIGHT(code, LEN(code)-10)) AS endpart
FROM @tmp
ORDER BY LEFT(code,10), CONVERT(INT,RIGHT(code, LEN(code)-10))
Result:
13028-2DEW1 13028-2DEW 1
13028-2DEW2 13028-2DEW 2
13028-2DEW3 13028-2DEW 3
13028-2DEW10 13028-2DEW 10
13028-2DFB1 13028-2DFB 1
13028-2DLW1 13028-2DLW 1
13028-2DLW2 13028-2DLW 2
13028-2DLW7 13028-2DLW 7
13028-2DLW10 13028-2DLW 10
13028-2DLW101 13028-2DLW 101
If you remove
begpart
and
endpart
from select list, you'll see only
code
values.