views:

43

answers:

2

I have a bunch of tables and I need to create basic INSERT stored procedures for all of them.

Does anyone have anything that does this or a good start to do this?

+1  A: 

Hey,

We use SSMS Tool Pack. Great tool once you get it configured how you like. It will generate all of your CRUD for you.

Once you get it setup you just right click on a table and generate crud. BOOM. You got it all done for you.

Another nice thing about this tool is that is integrates into SSMS.

Take a look http://www.ssmstoolspack.com/

Thanks, Mike

Mike
+1 for mentioning my friend mladen's tool
JonH
thanks! it really is a great tool!!
Mike
A: 

I wrote a stored proc:

CREATE PROCEDURE [dbo].[pDBCreateInsert] @schemaname varchar(max) = 'dbo', @tablename varchar(max) ...

I can then call: EXEC pDBCreateInsert @tablename = 'myTable' and it creates a stored proc called dbo.myTableInsert that does the insert.

Doing all tables would be easy with a cursor, but I never needed to.

Brad
Add your script.
Donny V.