Browse by Tags

All Tags » split (RSS)

Splitting delimited data to columns - Set based approach

In this post splitting-csv-to-columns I showed how to split delimited data into multiple columns Simon in his post Set-based-splitting-of-delimited-strings-to-columns showed how to use that in a set based approach which would work on a set of data.In...
Posted by Madhivanan | with no comments
Filed under: , , , ,

Splitting csv to columns

Suppose you have string in csv format and want to split into seperate columns. You can use parsename function as long as you have maximum four values. The following would work for any number of values declare @s varchar ( 2000 ), @data varchar ( 2000...
Posted by Madhivanan | 5 comment(s)

CSV to Multiple Columns

If the table is denormalised and has Comma Seperate Values in a column, this code will copy it to Multiple columns of a Normalised table declare @DeNormalisedTable table ( data varchar ( 8000 )) insert into @DeNormalisedTable select '1,Davolio,Nancy'...
Posted by Madhivanan | 2 comment(s)
Filed under: , ,