Chirag (3/23/2009)
JeffI mistook this (1230-544,15C5487,132DE78) for a single value rather than 3 values that they are. I assume the op wanted to process one value.
Using a number table would be the best way of doing this.
Assuming you have a number table called number this is the query
select substring('1230-544',number,1)
from number where number <= len('1230-544')
and substring('1230-544',number,1) like '[%0-9%]'
Understood and thanks for the feeback, Chirag... just wanted you to know that recursion should be avoided even more than a well written cursor is.
Also, your query doesn't put it all back together like the op wanted and you don't need the % signs in the like because you're looking at a single character.
--Jeff Moden
Change is inevitable... Change for the better is not.