On 16 September 2010 20:15, Chris Bruner <[email protected]> wrote: > I'm stuck with what should be a simple problem, but I can't move past it. > Two tables, I'm trying to update one tables latitude with the other > tables latitude where the zipcode match. (See below) > Can anybody help me? Thanks in advance. > > . . . > > sqlite> update agents set latitude=Latitude where agents.latitude=0 and > agents.Z > IP=zip.ZipCode; > Error: no such column: zip.ZipCode
update agents set latitude=coalesce( (select latitude from zip where ZipCode=agents.zip), latitude ) where latitude=0; Regards, Simon _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

