Question:I wanna extract all digit in nvarchar variable and store them in a table or pre-declare variable. example:
Answer:Another implementation of a recursive cte, but this time without substring since you don’t seem to like that
You can also insert this result into an existing table if you want, see this DBFiddle for an example
If you have better answer, please add a comment about this, thank you!