I created a dynamic sql statement that has a table variable in it. This returns and error that states I must declare the variable.DECLARE @tbl Table (fld1 char(10))exec ('SELECT * from ' + @tbl)-------Server: Msg 137, Level 15, State 2, Line 4Must declare the variable '@tbl'.[\code]I looked in BOL and found that the EXEC statement doesn't work well with variables until you use the SET command. This is BOL's example.[code] USE NorthwindGODECLARE @mycol nvarchar(20)SET @mycol = 'ContactName'EXECUTE ('SELECT ' + @mycol + ' FROM Customers')Any chance table variables will work in a dynamic SQL statement like the one above.Thanks