SQL Server 2008 Convert Rows into INSERT statement

  • Hello All,

    I am working on dynamically generated web form with bunch of controls in an ASP.NET project. When I save the data, I am passing all the controls (FieldName, FieldValue and FieldDatatype) as TVP to a stored procedure. Now I need to convert these rows into an INSERT statement. Basically each row represents a column in my main table. So, I need to build the INSERT statement out of these rows and execute it so INSERT a row into the database table. I need to do similar thing for an UPDATE statement.

    Any help would be greatly appreciated.

    Regards,

    AK

  • duplicazr post. no replies please.

    Original post: http://qa.sqlservercentral.com/Forums/FindPost1153892.aspx



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply