I am looking for a flexible approach constructing a TSQL. The below example obviously does not work but i need something similar to that, where I get to substitute Table Name with a parameter:
Declare @test nvarchar(50)
Set @test = 'MyTestTable'
SELECT * FROM @test
Is there known tricks to make this work?
Thank you in advance