"Greg Robertson" <[email protected]>
wrote in message
news:[email protected]
> 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

I'm confused which field is in which table. Your description is 
self-contradictory. Anyway, you want something like this (columns 
renamed in an obvious way for clarity):

update TableA set A2 =
    (select B2 from TableB where A1=B1)
where A1 in (select B1 from TableB);

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to