Re: Get last newsequentialid with output inserted
- From: Plamen Ratchev <Plamen@xxxxxxxxxxxxx>
- Date: Mon, 11 May 2009 08:40:58 -0400
Uri Dimant wrote:
I cannot tested the below right now on SS2008 (with FROM( UPDATE ...it should work) , do you have SQL Server 2008 BTW?
INSERT INTO books(id_author, pages)
SELECT id_author,120
FROM (insert into author(surname)
OUTPUT Inserted.id_author into ) AS T(id_author);
This will not work because one of the limitations of composable DML is that the target table cannot be in foreign key relationship with the source.
--
Plamen Ratchev
http://www.SQLStudio.com
.
- Follow-Ups:
- Re: Get last newsequentialid with output inserted
- From: Uri Dimant
- Re: Get last newsequentialid with output inserted
- References:
- Get last newsequentialid with output inserted
- From: jan . novak
- Re: Get last newsequentialid with output inserted
- From: Uri Dimant
- Get last newsequentialid with output inserted
- Prev by Date: Re: Calculating cumulative totals
- Next by Date: Re: Packing on data table.
- Previous by thread: Re: Get last newsequentialid with output inserted
- Next by thread: Re: Get last newsequentialid with output inserted
- Index(es):
Relevant Pages
|