Reputation: 2366
DECLARE @t TABLE
(
ID uniqueidentifier,
ID2 uniqueidentifier
)
...insert into @t ...do stuff to @t
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t)
-does not work?
Upvotes: 4
Views: 10582
Reputation: 17590
This is how you should do that:
INSERT INTO testTable (Id, Id2)
SELECT ID, ID2
from @t
Upvotes: 10