m trying to create a table dynamically.
I hav local var @local_var varchar(20)
set @local_var ='some_text'
now i want to dynamically create a table wit the same value stored in @local_var
I am doing Select * into @local_var from (select subquery) Alias
but I am unable to resolve the part in bold. I have been trying with different combinations of single quotes and double quotes but sometimes it tool @local_Var as table name instead of text value stored in that variable..
Thanks in advance.