Generating SQL Insert Statments

  • Is there any way of generating SQL inserting statments by providing a database name.




    My Blog: http://dineshasanka.spaces.live.com/

  • Maybe! Please provide more detail about what you are trying to achieve, as it isn't clear from your post.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • I have a data in my database i want to transfer them to my customers database. but i cant just backup and resotre the database due some other reasons. Only posible way is by running SQL Script like "Insert Into Table .."

    to do this I am looking forward to a tool or a method where I can generate sql scripts. There is a noce tool called APEX SQL SCRIPT but unfortunately it does give only 30 days.




    My Blog: http://dineshasanka.spaces.live.com/

  • See, if this helps:

    http://www.karaszi.com/sqlserver/info_generate_script.asp

     

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • You could use Query analyser.  Right-click on the table you want to create the insert statement for and select 'Script Object to new window' and choose the 'insert' option.

  • Jim, I think that the requirement here is to create not only the table, but the data too - QA won't generate this SQL.

    Cheers

    Phil

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Try this:

    http://vyaskn.tripod.com/code/generate_inserts.txt

    I've used this script many times, although I'm not sure where I first found it.

Viewing 7 posts - 1 through 6 (of 6 total)

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