Re: [sqlite] updating records in table A from joined recordsintable B

2011-04-01 Thread Robert Poor
On Fri, Apr 1, 2011 at 21:36, Igor Tandetnik wrote: > update table_a set avalue = ( >    select bvalue from table_b where akey=bkey >    union all >    select avalue); That also works. But at the risk of "moving the finish line during the race", I should point out that the

Re: [sqlite] updating records in table A from joined recordsintable B

2011-04-01 Thread Igor Tandetnik
Robert Poor wrote: > On Fri, Apr 1, 2011 at 20:13, Igor Tandetnik wrote: >> Or >> update table_a set avalue=coalesce( >> (select bvalue from table_b where akey=bkey), avalue); > > Nice. But if table_b.value is null, it won't get copied into table_a. >