[DUG] SQL - UPDATE
Mark Howard
mhoward at pslog.co.nz
Thu Oct 6 14:43:06 NZDT 2005
Hi John
Probably depends on what 'flavour' of SQL but you could try something along the lines of
UPDATE `COMPANY`
SET `COMPANY`.Region_ID = `Area`.Region_ID
FROM `AREA`
left outer join AREA on
`COMPANY`.Area_ID = `Area`.Area_ID
Mark
On Thu, 06 Oct 2005 14:28:49 +1300, John <john at padasy.co.nz> wrote:
> 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
>
>
>
--
Forest Production Systems Ltd
Creators of PSLog - A harvesting information system
www.pslog.co.nz
Skype: markhoward
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.10/119 - Release Date: 4/10/2005
More information about the Delphi
mailing list