• Carlos,

    First of all, great SP there...but let me tell you why mine is quite different from yours.

    1. Here my aim was to script the table s data in insert script format. this way the generated insert script could be run on any other server /database.

    if you look at the output of your SP which is

    SET IDENTITY_INSERT DataLink ON

    INSERT INTO DataLink (

    LinkId

    ,LinkDisplay

    ,LinkAddress

    ,LinkStatus

    )

    SELECT

    a.LinkId

    ,a.LinkDisplay

    ,a.LinkAddress

    ,a.LinkStatus

    FROM DataLink a

    SET IDENTITY_INSERT DataLink OFF

    Now this is an insert script ..ofcourse but why is that the target table and the base table are the same.Hmm....did i run this wrong?;)

    Nope I dint...Anyways my point is

    The SP that i had written would literally give you the insert script like this

    INSERT INTO [dbo].[DataLink] (LinkDisplay,LinkAddress,LinkStatus) values ('Whats New as of June 25,2008','http://www.google.ca',0)

    INSERT INTO [dbo].[DataLink] (LinkDisplay,LinkAddress,LinkStatus) values ('Test','http://www.google.ca',0)

    INSERT INTO [dbo].[DataLink] (LinkDisplay,LinkAddress,LinkStatus) values ('Whats New as of October 29th','http://www.google.ca',1)

    By providing it in this manner , the user can make use of it whereever he requires.

    I m not sure if i have put clearly across to you the basic difference b/w the two scripts.:hehe: