Is it possible that I set the table name from which I want to select as a variable?
DECLARE @table varchar(800)
SET @table = RIGHT(CAST(MONTH(CURRENT_TIMESTAMP) AS VARCHAR),2)
SELECT Column1, Column3, Column5 FROM @table
I would like to always select the table based on the month value.
Any help is appreciated.