That did it. Thanks
Greg On Mon, Feb 23, 2009 at 7:05 PM, Griggs, Donald <donald.gri...@allscripts.com> wrote: > Hi Greg, > > Someone on the list may give a better reply, and I'm sending this to you > directly, but I think the following will work: > > Update tableA > set Field2 = ( select Field4 from tableB > where TableA.Field3=TableB.Field4 ); > > Regards, > Donald > > -----Original Message----- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Greg Robertson > Sent: Monday, February 23, 2009 6:34 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] UPDATE Field based on matching value in different > Table > > I have two tables each with two fields: > > TableA: Field1, Field2 > > TableB: Field3, Field4 > > > I would like to set Field2 in TableA to the value in Field4 in TableB > where TableA.Field3=TableB.Field4 > > Sounds simple enough but I can't figure out how to write the UPDATE > SQLite for this. > > Can someone help? > > Thanks > > Greg > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users