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 2000 Forums
 SQL Server Administration (2000)
 Passing Variable To System Stored Procedure !!

Author  Topic 

trusted4u
Posting Yak Master

109 Posts

Posted - 2002-09-29 : 04:14:31
Hi :
How to pass variables as the arguments of system stored procedure. For Eg :
Declare @tabname varchar(20)
set @tabname = 'table1'
sp_help @tabname

Returns =>Incorrect syntax near sp_help

Plz guide me to overcome this problem.
Thanks.
Marjo.

smccreadie
Aged Yak Warrior

505 Posts

Posted - 2002-09-29 : 06:08:59
Try doing a search - this question has been asked countless times.

See http://www.sqlteam.com/FAQ.asp and click on the dynamic SQL part.

Go to Top of Page

trusted4u
Posting Yak Master

109 Posts

Posted - 2002-09-29 : 06:38:27
Thanx a lot smccreadie. I got the solution. Thanx Once again.
Best Regards,
Marjo.

Go to Top of Page
   

- Advertisement -