I'm trying this on SQL SERVER 7.0
CREATE PROCEDURE MYPROC
@MYTABLE_NAME VARCHAR(50),
@MYVALUE VARCHAR(10)
AS DELETE FROM @MYTABLE_NAME WHERE TABLE_FIELD = @MYVALUE
My intention is to create a stored procedure wich I can use to delete records from different tables depending on a parameter; but it seems that SQL does not accept a parameter as a valid expression for a table name.
SQL responds with an error message in line 3 saying: Error near @MYtable_name
Is there any way to get what I want?
TIA
There´s a better life... Just it´s more expensive!
Cristóbal Manrique M.