Home Forums SQL Server 7,2000 T-SQL Csv list in column to separate columns RE: Csv list in column to separate columns

  • Jeff Moden (9/30/2012)


    Eliza (9/30/2012)


    Hi Jeff,

    Thanks for your reply. I have have played around with the SQL but still struggling. I can get it to pivot from being rows to columns and used this technique a few times now, but this is going from 1 column to many columns and so if you are able to help any further please do as I'm stuck.

    Thanks

    Eliza.

    Understood. Because ROW_NUMBER() isn't available in SQL Server 2000, this could become a little complex and a fair bit slow depending on the condition of the CSV on each row. So let me ask, is the number of elements within each CSV fixed or does it need to be variable even within the same run?

    Hi Jeff,

    As mentioned earlier, the number will vary between 0 a null value and a max of 25 elements. Row_Number() is available on our version of SQL server (2008 R2)