• Sean Lange (3/3/2015)


    yungmunk (3/2/2015)


    Hello, I'm sorry to resurrect such an old post but I'm trying to do basically the same thing the original poster was. Your code looks very simple and easy to use but I'm not sure how an UPDATE would fit in to this. Could you provide an example?

    Assuming you are trying to do the same as the OP just add the string literal I posted at the beginning of the sql variable.

    You might also want to take a look at this article to generate the comma separated list of columns. http://www.sqlservercentral.com/articles/comma+separated+list/71700/[/url]

    I'm sorry but does this code change the data within the table or the column names? Also I'm not sure what you mean by the sql variable. I don't see a variable declared. Sorry, I'm brand new to dynamic sql.