Hello,

I want to do two sql INSERTS into the same table (table holds pk and fk rows) but I need the second insert to use the new Identity from the first INSERT. Something like:

Code:
INSERT INTO [table]
SELECT [Cols] FROM [Table] Where [blah];SELECT NewUDValue AS @@IDENTITY;
UNION ALL
SELECT [colName = NewUDValue, more cols] FROM [Tablle] Where [Blah]
However this doesn't work! Is this...