> update test set ID=BucketID > from buckets B, test T > where B.CheckSum=T.CheckSum
Your update is logically equivalent to this pseudocode: for every testcs in (select checksum from test) do update test set id = (select bucketid from buckets where buckets.checksum = testcs) where test.checksum = testcs You'll have to program the 'for every ...' part yourself and insert the appropriate value of testcs into the sub- query and where clause in the update statement. Note that subqueries in SQLite must be self-contained; they can't refer to anything outside themselves (www.sqlite.org/omitted.html). Regards