Home Forums SQL Server 2008 T-SQL (SS2K8) Help needed to decode comma delimited string and insert into tables RE: Help needed to decode comma delimited string and insert into tables

  • thanks kumar20, you code is working, However, I forgot to mention the fact that new value and old value can contain multiple words.

    e.g. "new value" "Old value"

    I am modifying your code to suit my needs. I will test the performance after that. 🙂

    ---------------

    updates: there is a logic error, when there are equal number of field and colummn changes, the procedure will ignore the column changes.

    I suspect that it is caused by MAX().

    sample string 3:

    ,1 Field_Name "F3", 1 New_Field_Name "F3", 1 Old_Field_Name "f3" ,1 Column_Name "Col6" ,1 New_Column_Value "F", 1 Old_Column_Value "f"