I tried to search some post but i got no lucky to find like my scenario:
This is my attempt but no luck.
declare @tb varchar(30)
set @tb = 'newtablename'
declare @sql varchar(30) = 'select * into ' + @tb + ' from tbl_3;'
EXEC sp_executesql @sql
it returns an error
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
Any suggestions will be appreciated.
Thanks in advance.