 |
| SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

December 2nd, 2005, 07:03 AM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Stored procedure that deletes given SP
is that possible in SQL...
|
|

December 2nd, 2005, 02:53 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
Not sure what you are asking?
|
|

December 6th, 2005, 08:22 AM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by jbenson001
Not sure what you are asking?
|
i am not sure too...:)
i give delete sp as parameter sp to delete. And this sp deletes that sp:)
|
|

December 6th, 2005, 10:57 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
Yes, you can do that.. but you will have to use dynacmic sql to do it.
|
|

December 7th, 2005, 03:34 PM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by jbenson001
Yes, you can do that.. but you will have to use dynacmic sql to do it.
|
so how ?
|
|

December 7th, 2005, 04:25 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
declare @sql nvarchar(500)
declare @proc nvarchar(100)
set @sql = 'Drop Procedure ' + @proc
EXEC sp_executesql @sql
You should check if the proc exists first so you don't get an error if it doesn't
Check books on line for more help.
Jim
|
|

December 8th, 2005, 07:24 AM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by jbenson001
declare @sql nvarchar(500)
declare @proc nvarchar(100)
set @sql = 'Drop Procedure ' + @proc
EXEC sp_executesql @sql
You should check if the proc exists first so you don't get an error if it doesn't
Check books on line for more help.
Jim
|
thx where can i get these books ?
|
|

December 8th, 2005, 10:47 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
Books On Line is the help for SQL Server, it should have been installed with the server installation.
|
|

December 9th, 2005, 08:37 AM
|
|
Authorized User
|
|
Join Date: Sep 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by jbenson001
Books On Line is the help for SQL Server, it should have been installed with the server installation.
|
with 2005 EE i dont have it:(
|
|
 |