January 27, 2006 at 2:58 am
Hi
I have column with repeating value which I want to fix as follows.
Tbl_A
Col_1
225
221,222
41-45, 49
332-337, 211, 63-66
where (41-45) means 41,42,43,44,45 etc.
& (221,222) means 221 and 222
332-337, 211, 63-66 means both above
I want to overcome these repairing values by adding the separate rows (with same values of other columns) for each value.
Please advise how to build a procedure / function for that which can understand (‘-‘ & ‘,’).
Wishes
Jawad
January 27, 2006 at 8:21 am
I implemented a SQLCLR streaming table-valued function for doing this as an experiment. I guess you are using SQL Server 2000 so it probably is not of help to you, but if you are interested then the code is in my blog.
I encountered some problems with shared state and anonymous delegates when I implemented it so anyone interested in the details will probably also want to read the companion post describing those issues.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply