Insert a table variable into a TempTable with multiple columns (ID, Number, etc.)
One of the table variables is:
DECLARE @@gvTempTable TABLE (Number bigint, ID int)
insert into @@gvTempTable (Number) values ('21212321332332');
insert into @@gvTempTable (Number) values ('100000000000');
insert into @@gvTempTable (ID) values ('1');
insert into @@gvTempTable (ID) values ('12');
select * into ##GlobalTempTable from @@gvTempTable;
select * from ##GlobalTempTable;
I need to display ID and Number as one row without NULL
This returns a kind of Cartesian Product:
[![Current vs Desired result set][1]][1]