I'm trying to pass a table name and two field names into a stored procedure to execute.
For Example:
@TableName varchar(50),
@Field1 varchar(50),
@Field2 varchar(50)
AS
SELECT @Field1, @Field2 FROM @TableName
It always errors out saying that the variables are not defined. Any ideas.
Thanks,
Randy