Re: Get last newsequentialid with output inserted

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • Re: Get last newsequentialid with output inserted
    ... Uri Dimant wrote: ... do you have SQL Server 2008 BTW? ... Plamen Ratchev ...
    (microsoft.public.sqlserver.programming)
  • Re: Missing indexes script.
    ... That isn't much advantage, btw. ... Do you perhaps have more than one database with this table and field? ... So the missing index script wants me to create, as its top priority, ... Any idea why SQL server isn't using this index? ...
    (microsoft.public.sqlserver.programming)
  • .NET Web Scrapper project
    ... I am about to commence a web scrapper project using vb/c# + sql server. ... student with no commerical experience. ... the aim of this scrapper is to: Scrape content off a website and store them in a SQL Server database. ... Btw, information in re: to this seems to be VERY scarce. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DB is ReadOnly?
    ... I'm glad you found that -- the default is snapshot from what I remember (and ... BTW, speed is only one factor, I would be more concerned about stability, ... While DAO is fast (and it has always ... old library to access SQL Server. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Paging
    ... on during that time period (Sql Server 2000 btw): ... A checkdb of a good sized database. ... Btw, it was at the very end of the checkdb that the paging ... >there is an operation going on that doesn't fit in memory ...
    (microsoft.public.sqlserver.server)