Re: Get last newsequentialid with output inserted
- From: "Uri Dimant" <urid@xxxxxxxxxxx>
- Date: Mon, 11 May 2009 15:51:47 +0300
Plamen
So if the OP dropes FKeys it should work, right?
"Plamen Ratchev" <Plamen@xxxxxxxxxxxxx> wrote in message
news:_omdndUciI96gZXXnZ2dnUVZ_uidnZ2d@xxxxxxxxxxxxxxxx
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: Plamen Ratchev
- 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
- Re: Get last newsequentialid with output inserted
- From: Plamen Ratchev
- Get last newsequentialid with output inserted
- Prev by Date: Re: Packing on data table.
- Next by Date: Celko never responds when challenged by Tony, why?
- Previous by thread: Re: Get last newsequentialid with output inserted
- Next by thread: Re: Get last newsequentialid with output inserted
- Index(es):
Relevant Pages
|