Has any body got any idea how I can use a variable as a table name when
trying to insert data into a table
My code uses VB to pass parameters to a SQL server 7 stored procedure which
will populate a table.
Basically all I need to know is how do you write the syntax.

eg.

CREATE PROCEDURE [INSERT_DATA]
@TABLENAME AS SYSNAME

AS

INSERT INTO @TABLENAME
(NAME, ADDRESSS, DOB)

VALUES
(@NAME, @ADDRESS, @DOB)

It will not recognize @TABLENAME as a valid table name.

Is it the syntax???

Any help at all would be great

Thanks..