Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Generating T-SQL

Author  Topic 

Cerin
Starting Member

7 Posts

Posted - 2008-10-08 : 11:30:37
Is there any tool or procedure to generate the insert/update SQL for a record in an arbitrary table given a primary key?

When debugging, I find it useful to script out specific records, and it's laborious to write that code manually.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-10-08 : 11:33:38
http://weblogs.sqlteam.com/mladenp/archive/2008/10/06/SSMS-Tools-PACK-1.1---now-with-SQL-Server-Management.aspx

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

Cerin
Starting Member

7 Posts

Posted - 2008-10-08 : 11:51:35
Thanks, that looks pretty close to what I need. Unfortunately, it causes Studio 2005 to throw an exception for nearly every action I take.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-10-08 : 13:06:14
it does? can you send me an exception?

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page
   

- Advertisement -