QueueNo 3B001 3B002 3B003 . . . 3B010
QueueNo No 3B001 1 3B002 2 3B003 3 . . . . . . 3B010 10
SELECT Code, CONVERT(INT,Right(Code,3)) AS CodeNo FROM ( SELECT '3B010' AS Code UNION ALL SELECT '3B001' AS Code ) AS T
3B010 10 3B001 1
SELECT QueueNo, CAST(REPLACE(QueueNo, '3B', '') AS INT) AS No FROM #Temp
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)