Subject RE: [firebird-support] Re: Update with data FROM a table
Author Svend Meyland Nicolaisen
No it may not!? But does it introduce some unnecessary overhead in the
current version and/or in future versions?

/Svend

> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Aage Johansen
> Sent: 25. august 2005 22:39
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Re: Update with data FROM a table
>
> m_formigoni wrote:
> > --- In firebird-support@yahoogroups.com, Magnus Titho >
> <magnus.titho@k...> wrote:
> >
> >>update table1 t1
> >>set t1.field1 =3D (select t2.field1 from table2 t2 where
> t1.id =3D t2.id)= > > , >
> >>t1.field2 =3D (select t2.field2 from table2 t2 where t1.id
> =3D t2.id) >>=20 >>This will either work or throw an error
> "multiple rows in singleton=20 >>select" if there is more
> than one matching record in table2.
> >>=20
> >>--=20
> >>Magnus
> >
> >
> > Yes, it works fine, but I'm looking for a way that I don't
> need to do > "n" selects in the table2 (imagine updating 30
> fields in table1 from > table2, its costs goes very high).
> >
>
> This has been discussed on the Interbase/Firebird lists for years...
> As for (very high) cost, after the first select most data
> will be in memory
> (cache) so the next selects will probably not incur the
> overhead of physical disk access.
>
> --
> Aage J.
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> <font face=arial size=-1><a
> href="http://us.ard.yahoo.com/SIG=12huonj45/M=362131.6882499.7
> 825260.1510227/D=groups/S=1705115386:TM/Y=YAHOO/EXP=1125009595
> /A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
> ">Get Bzzzy! (real tools to help you find a job) Welcome to
> the Sweet Life - brought to you by One Economy</a>.</font>
> --------------------------------------------------------------
> ------~->
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources
> item on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>