Subject | Re: Update with data FROM a table |
---|---|
Author | m_formigoni |
Post date | 2005-08-25T15:05:48Z |
--- In firebird-support@yahoogroups.com, Magnus Titho
<magnus.titho@k...> wrote:
"n" selects in the table2 (imagine updating 30 fields in table1 from
table2, its costs goes very high).
Tks.
Mauro.
<magnus.titho@k...> wrote:
> update table1 t1Yes, it works fine, but I'm looking for a way that I don't need to do
> set t1.field1 = (select t2.field1 from table2 t2 where t1.id = t2.id),
> t1.field2 = (select t2.field2 from table2 t2 where t1.id = t2.id)
>
> This will either work or throw an error "multiple rows in singleton
> select" if there is more than one matching record in table2.
>
> --
> Magnus
"n" selects in the table2 (imagine updating 30 fields in table1 from
table2, its costs goes very high).
Tks.
Mauro.