I have a requirement in which i need to concatenate a value to table name. The requirement is as follows:
DECLARE @TableName varchar(50);
SET @TableName = (SELECT 'TableName' + CONVERT(varchar(50), 2019));
PRINT @TableName;
SELECT * FROM @TableName
I don't want to use dynamic sql query Can anybody suggests the solution to this problem.