DECLARE @col VARCHAR(80)
SELECT @col = '5,2,3,4,23,534,45,33,6,7,5,3'
SELECT SUBSTRING(
REVERSE
(SUBSTRING
(REVERSE
(REPLACE(',' + @col + ',', ',5,', ',')
)
, 2, 80)
)
, 2, 80)
--2,3,4,23,534,45,33,6,7,3
It looks clumsy but will work over a large table without iteration or cursors. the 80 is the length of the column in our example, but I've used a 80-char variable to test it with