To answer my own post, syntax should have been:
db.executesql("UPDATE Plant SET SiteID=(SELECT Site.id FROM Site WHERE
Site.SiteId = Plant.SiteIdLink);")
Sorry about that ...
On Monday, May 21, 2012 2:50:33 PM UTC+10, Simon Ashley wrote:
>
> trying the following expression but get an update according to the first
> record rather than being conditional on specific records processed:
>
> db.executesql("UPDATE Plant SET SiteID=(SELECT Site.id FROM Plant, Site
> WHERE Site.SiteId = Plant.SiteIdLink);")
>
>
> ie. all SiteID's get the value of the first Site.SiteId =
> Plant.SiteIdLink encountered.
>
> Just can't see the solution at present.
>