[DUG] SQL - UPDATE
Todd Martin
toddm at kol.co.nz
Thu Oct 6 03:35:43 NZDT 2005
How about this
UPDATE COMPANY, AREA
SET COMPANY.Region_ID = Area.Region_ID
WHERE COMPANY.Area_ID = Area.Area_ID
or
UPDATE COMPANY INNER JOIN AREA ON COMPANY.Area_ID = Area.Area_ID
SET COMPANY.Region_ID = Area.Region_ID
Todd.
>I wanna update the table COMPANY from a linked field. The following is not
> accepted. Could anybody help me with what the command should be?
>
> Thanks a lot.
> John
>
>
> UPDATE `COMPANY`
> SET `COMPANY`.Region_ID =
> (
> SELECT `Area`.Region_ID
> FROM `AREA`
> WHERE `COMPANY`.Area_ID = `Area`.Area_ID
> )
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 29/09/2005
>
>
More information about the Delphi
mailing list