split-function

SQL: break up one row into many (normalization)

I am in middle of upgrading from a poorly designed legacy database to a new database. In the old database there is tableA with fields Id and Commodities. Id is the primary key and contains an int and Commodities contains a comma delimited list. TableA: id | commodities 1135 | fish,eggs,meat 1127 | flour,oil In the new datab...

SQL Server 2005 seperate stored procedure CSV value into multiple columns?

I'm a SQL Server 2005 newb and I have to do something that should be easy but I'm having difficulties. For the time being my stored procedure is storing csv in one column in my db. I need to break apart the csv into multiple columns. The number of values in a the CSV parameter is static, there is always gonna be 8 values and they are al...