One of the most irritating things about SSMS is that "Script Table As
-> INSERT To" doesn't work like you'd want. Sometimes you get into a
situation where just wanting to pass around some test data becomes
irritatingly non-trivial...
Just want to generate a SQL script that you can run to insert a table's worth of data?
Here's a SQL script that generates a stored procedure to do just that!
Just run the script, and then EXEC sp_generate_inserts '[TableName]' to
get a result set of properly formatted INSERT statements containing -
imagine this - the actual data from the table!
There are some nice optional arguments that you can use as well; it'll
automatically omit identity columns if you tell it to, and while
computed columns will give you a headache, you can specifically exclude
any column you want. Unfortunately, there are some spelling mistakes and other gotchas in the script, so you're
best to
see his original page for instructions on how to use it. Regardless, it's a nice time-saver to have lying around.