>Suppose one has a SP with parameter @Table, I'd like to
>
>SELECT * FROM @Table WHERE ....
>
>Only, it does not work that way, so if you know of a way, please let me know.
>
>TIA
You can do this with
EXECUTE ('SELECT * FROM '+@Table+' WHERE ...')
or with
SELECT @SQLString='SELECT * FROM '+@Table+' WHERE ...'
EXEC sp_executesql @SQLString
but these have various restrictions.