DECLARE @t TABLE ( ID uniqueidentifier, ID2 uniqueidentifier )
... insert into @t ... make stuff for @t
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t) - does not work?
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t)
Here's how you should do it:
INSERT INTO testTable (Id, Id2) SELECT ID, ID2 from @t
How about this?
INSERT INTO testTable SELECT ID, ID2 from @t