In my dynamic SQL I am using a variable for the table name, which is populated using a loop in the statement, for a number range. There are 10 tables so it works like this:
Table[Int...10] within the select statement. However is there a way to display the table value as a string so I can show it as a column value rather than as a value I am trying to select from the table? Much like using a placeholder such as:
Select '@TableName' as [Table Name]
When I do this it shows '@TableName' in select statement instead of the actual value.
Is this even possible?