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 Development (2000)
 sql parameter

Author  Topic 

skillile
Posting Yak Master

208 Posts

Posted - 2002-09-20 : 08:25:15
I am having trouble with this, wondering if it is possible.

Send paramater varchar(2000) into SPROC
ie @cmd="INSERT INTO xx (i) VALUES(1)"

SPROC =

CREATE PROC xx

(
@cmd varchar(2000)
)

AS

EXECUTE @cmd


can this be done. I can't seem to make it work.



slow down to move faster...

nr
SQLTeam MVY

12543 Posts

Posted - 2002-09-20 : 08:32:27
EXECUTE (@cmd)

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -