christywarner
Programmer
Hi,
I want to create a procedure "EXISTDROP" that
will drop a SQL Server table where the table name
is passed from my VB app. Here is what I have
but I'm getting the error message:
"Incorrect syntax near @TABLENAME on line 5"
CREATE PROCEDURE EXISTDROP
@TABLENAME VARCHAR(75) AS
IF EXISTS (SELECT name FROM sysobjects WHERE NAME= @TABLENAME)
DROP @TABLENAME
GO
Thanks for any help!
Christy.
I want to create a procedure "EXISTDROP" that
will drop a SQL Server table where the table name
is passed from my VB app. Here is what I have
but I'm getting the error message:
"Incorrect syntax near @TABLENAME on line 5"
CREATE PROCEDURE EXISTDROP
@TABLENAME VARCHAR(75) AS
IF EXISTS (SELECT name FROM sysobjects WHERE NAME= @TABLENAME)
DROP @TABLENAME
GO
Thanks for any help!
Christy.