Subject | Re: [firebird-support] Update statement syntax |
---|---|
Author | Ann W. Harrison |
Post date | 2005-04-08T16:04:22Z |
Norman McFarlane wrote:
This does and is.
UPDATE CustomerDetails CD1
SET CD1.C_ACCEXEC = SELECT MAX (AE.C_ACCEXEC)
FROM Customer_Details CD2
JOIN AccountExec AE
ON (CD2.C_ACCEXEC=AE.Name OR CD2.C_ACCEXEC=AE.Name||' 2')
Note that the concatenation operator for Firebird (and standard SQL) is
|| not +
Regards,
Ann
> For the record, here is a complete example of the UPDATE ... JOIN syntax that IThat syntax doesn't work in Firebird, nor is it part of standard SQL.
> posted earlier. This from one of my current projects.
>
> UPDATE CD
> SET
> C_ACCEXEC=AE.C_ACCEXEC
> FROM Customer_Details CD
> JOIN AccountExec AE ON (CD.C_ACCEXEC=AE.Name OR CD.C_ACCEXEC=AE.Name+' 2')
> Note the use of the keyword FROM to denote the table which is being updated.
>
> I hope this finally helps.
This does and is.
UPDATE CustomerDetails CD1
SET CD1.C_ACCEXEC = SELECT MAX (AE.C_ACCEXEC)
FROM Customer_Details CD2
JOIN AccountExec AE
ON (CD2.C_ACCEXEC=AE.Name OR CD2.C_ACCEXEC=AE.Name||' 2')
Note that the concatenation operator for Firebird (and standard SQL) is
|| not +
Regards,
Ann