Another thing, you cannot use @t in the from clause if @t is not a table variable.
If you are passing only the name, you need to build up your query using dynamic SQL
declare @query varchar(1000)
set @query = 'select * from ' + @a
exec(@query)
Regards,
Andras