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)
 Alter stored procedure dynamically

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-21 : 07:40:43
Mitch writes "I'd like to do the following alter stored procedure. The idea is to insert a table column dynamically. Of course, the syntax doesn't work properly. Wonder if you can shed some light.

ALTER PROCEDURE INSERTTABLECOLUMN
(
@COLUMN VARCHAR(50),
@DATATYPE VARCHAR(50),
@ISNULL VARCHAR(50))
AS

ALTER TABLE TEST
ADD
@CLAIMCOLUMN,
@CLAIMDATATYPE,
@CLAIMISNULL
GO"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-21 : 08:02:08
You'll need to use dynamic SQL to do this.

Jay White
{0}
Go to Top of Page
   

- Advertisement -