Subject | Re: [firebird-support] UPDATE AND DELETE WITH JOIN |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2006-07-11T13:58:59Z |
Roberto Freitas wrote:
where MAT.ALREG = (select ALU.ALREG from alu WHERE ALU.EDCOD='TWQ');
This works if ALU.EDCOD is unique, if not you have to do something like
UPDATE MAT SET MAT.MT=137
where exists (select * from ALU WHERE ALU.EDCOD='TWQ' and MAT.ALREG =
ALU.ALREG);
HTH,
Set
> Hello,UPDATE MAT SET MAT.MT=137
> This is a valid sentence with SQL Server:
> 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?
where MAT.ALREG = (select ALU.ALREG from alu WHERE ALU.EDCOD='TWQ');
This works if ALU.EDCOD is unique, if not you have to do something like
UPDATE MAT SET MAT.MT=137
where exists (select * from ALU WHERE ALU.EDCOD='TWQ' and MAT.ALREG =
ALU.ALREG);
HTH,
Set