insert into workTable
output inserted.firstfield, inserted.computedValue
select OriginalTable.*
from (
SELECT firstfield,computedvalue
FROM tableA
WHERE.....
EXCEPT
SELECT firstfield,computedvalue
FROM tableB
WHERE.....
) WantedRows
inner join tableA OriginalTable
on WantedRows.computedValue = OriginalTable.computedvalue
|