Re: Get last newsequentialid with output inserted

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
    ... So if the OP dropes FKeys it should work, ... 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: Fresh installation and no access
    ... "Uri Dimant" wrote in message ... did you set up SQL Server to Windows only or Mixed Authentication? ... loggin in with my user accountI have no permission at all. ... Then I got this error message: ...
    (microsoft.public.sqlserver.security)
  • Re: Issue in SQL version
    ... "Uri Dimant" wrote: ... SQL Server you get the version of SQL ... Copyright 1988-2003 Microsoft Corporation Developer Edition on ... And what i got running same in Sql Server managment studio 2000: ...
    (microsoft.public.sqlserver.security)