Using variables in Select Statements



Hi guys,

I was wondering if it is possible to use a variable in the from part of a
select statement as in...

select *
from @myVariable

Basically I am writing stored procedure that the user passes a table name to
and then it goes off and grabs info from this table and does some funky
stuff. Is it possible to make the statements semi-dynamic in that manner?

Cheers

.