Have you seen a sql tool? [modified]
-
Try SSMS ToolsPack[^]. I like it a lot.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
Wow, thanks! :) And I thought RedGate had some evil monopoly on SSMS add-ons. It looked possible to do when I checked it out years ago, but insanely undocumented. I know it's the VS shell, but there isn't an explicit, public SSMS extension interface.
-
Try SSMS ToolsPack[^]. I like it a lot.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
-
The RedGate tools could probably help you, and if it's an immediate problem, you can use their evaluation period.
-
Wow, thanks! :) And I thought RedGate had some evil monopoly on SSMS add-ons. It looked possible to do when I checked it out years ago, but insanely undocumented. I know it's the VS shell, but there isn't an explicit, public SSMS extension interface.
Brady Kelly wrote:
but insanely undocumented.
Oh yusssss! The guy that wrote it does a lot of good stuff.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
-
Try SSMS ToolsPack[^]. I like it a lot.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
-
It's a pleasure
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
-
Have you seen a sql tool that can generate stored procedures against a table for select, insert, update and delete? Sql2008 provides scripts for the four actions. But the code is far from a stored procedure. Thanks,
TOMZ_KV
moved on Friday, February 18, 2011 4:26 PM
I use the script below to create auto gen scripts for crud. Mix and match to suit your needs. Once you have what you want save it as an sp with the table name as a parameter and you are good to go.
SELECT * FROM sysColumns WHERE id = (select id from sysObjects where name = 'myTable');
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
-
Have you seen a sql tool that can generate stored procedures against a table for select, insert, update and delete? Sql2008 provides scripts for the four actions. But the code is far from a stored procedure. Thanks,
TOMZ_KV
moved on Friday, February 18, 2011 4:26 PM
You can also do it with Visual Studio. http://weblogs.asp.net/stevewellens/archive/2009/12/11/automatically-generate-stored-procedures-with-visual-studio.aspx[^]
Steve Wellens
-
I use the script below to create auto gen scripts for crud. Mix and match to suit your needs. Once you have what you want save it as an sp with the table name as a parameter and you are good to go.
SELECT * FROM sysColumns WHERE id = (select id from sysObjects where name = 'myTable');
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
-
You can also do it with Visual Studio. http://weblogs.asp.net/stevewellens/archive/2009/12/11/automatically-generate-stored-procedures-with-visual-studio.aspx[^]
Steve Wellens
-
Have you seen a sql tool that can generate stored procedures against a table for select, insert, update and delete? Sql2008 provides scripts for the four actions. But the code is far from a stored procedure. Thanks,
TOMZ_KV
moved on Friday, February 18, 2011 4:26 PM
I'm glad you got answers you like. But... Personally I don't see the point in writing stored procedures that simply do those tasks -- especially update; update what? -- database tasks depend on the needs of business requirements which often don't include simple inserts, updates, and deletes on individual tables. Most database tables don't exist all on their own and several operations need to be executed at one time. It's well known that I don't like stored procedures at all, but at least they should be written to perform a higher-level operation than one simple operation.
-
Have you seen a sql tool that can generate stored procedures against a table for select, insert, update and delete? Sql2008 provides scripts for the four actions. But the code is far from a stored procedure. Thanks,
TOMZ_KV
moved on Friday, February 18, 2011 4:26 PM
I've seen lots of tools make attempts at using sql, but in response to your question all you have to do is wrap the generated sql in a create procedure call, add parameters and voila, you have your skeleton procedure. Of course I believe that all procedures should do whatever they can to protect the data so I insist that any procedures written on my watch contain validation of whatever can be validated.
I wasn't, now I am, then I won't be anymore.