I find very helpful post, how to remove non-numeric characters from string: https://stackoverflow.com/a/18635337/6216435
But few questions arose, hopefully someone can explain a bit.
1) Why to use this:
select top (100) N=row_number() over (order by @@spid) from sys.all_columns)
Results gives numbers 1-100, but why @@spid and sys.all_columns? Is there better way to do it?
2) ..where N<=datalength(DirtyCol)) [1] where C between '0' and '9'
- what does [1] represents here?
Thanks for your help :)