Subject | Re: [firebird-support] Re: UPDATE AND DELETE WITH JOIN |
---|---|
Author | Sándor Tamás (HostWare Kft.) |
Post date | 2006-07-11T14:44:49Z |
Maybe you're right, and it'll be in future Firebird distributions. But it's still illogical. How can I update FROM anything? I can only update somtehing. And if I use Inner join, which table will be updated? I think it's much more logical to update something, where I can't find appropriate records in another table.
SanTa
SanTa
----- Original Message -----
From: Roberto Freitas
To: firebird-support@yahoogroups.com
Sent: Tuesday, July 11, 2006 4:38 PM
Subject: [firebird-support] Re: UPDATE AND DELETE WITH JOIN
I think it's a pitty that FireBird (such an excelent DB Server)
hasn't YET this feature, because it's much more flexible to do update
and delete with INNER JOINS than the way to do the same with FireBird.
I could bet it'll have in the future ...
--- In firebird-support@yahoogroups.com, Ali Gökçen <ali_gokcen@...>
wrote:
>
> Hi Roberto
>
> > This is a valid sentence with SQL Server:
>
> Really? what a pitty for MSSQL users.
>
> > UPDATE MAT SET MAT.MT=137
> > FROM MAT INNER JOIN ALU ON MAT.ALREG = ALU.ALREG
> > WHERE ALU.EDCOD='TWQ';
> > With FireBird 1.5 I get Token unknow line 2 char 1 FROM
> > How can I do this kind of UPDATE with FireBird 1.5?
> > How can I do a similar DELETE (with JOIN) with FireBird 1.5?
> >
>
> You are allready saying "UPDATE MAT",
> so, what is it for "FROM MAT" ?
>
> Try this:
> UPDATE MAT SET MAT.MT=137
> WHERE EXISTS (SELECT 1 FROM ALU WHERE MAT.ALREG = ALU.ALREG
> AND ALU.EDCOD='TWQ')
>
> Regards.
> Ali
>
[Non-text portions of this message have been removed]