Aston,
You can build SQL string and execute it dynamicaly with EXECUTE command or sp_executesql system stored procedure.
DECLARE @Sql varchar(256)
SET @Sql = 'SELECT fld1 FROM [' + @lcTableName + ']'
EXECUTE (@Sql)
>Hi all,
>
>Does it allow us to put @Variable as table name in SQL Statemnt, cause I want to build a Stored Proc allow me to call any table by the parameter, but I meet a error.
>
>SELECT fld1 FROM [@lcTableName]
>
>Thanks for your help
>Aston
--sb--