Home Forums Programming XML Converting table data into Table columns + <xmlformat> in last column RE: Converting table data into Table columns + <xmlformat> in last column

  • Vijay_Raju (10/2/2012)


    I have a Table with 20 columns the first 12 columns needs to be same as it is, but from 13th column to 20 column i want it in xml format and should be placed in 13th column.

    Can any one suggest best way of doing this in SSIS

    Not sure why you need to use SSIS to change a single table. Not sure what you mean by xml format but can you just change the datatype to xml for the columns you want to change?

    Or are you saying to want to intentionally combine columns 13 - 20 into a single xml column? Again I don't know why you want to use SSIS for this.

    I am pretty sure that a query can do everything you are trying to do here. Take a look at the first link in my signature about best practices when posting questions.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/