From: Jack on
Thanks Plamen for your help. It worked great.
Regards.

"Plamen Ratchev" wrote:

> You can use the OUTPUT clause:
>
> INSERT INTO @test
> OUTPUT Inserted.machine, Inserted.plan_date, Inserted.plan_hrs
> SELECT machine, DATEADD(dd, @days, '20100101'), 16
> FROM @machines;
>
> --
> Plamen Ratchev
> http://www.SQLStudio.com
> .
>