I've been struggling with the following:
update table1 set column3 = (select i.colum3 from table2 i, table1 t
where t.column1 = i.column1 and t.column2 = i.column2)
Reading the manual and this list I learned that this statement will
grab the first result of my sub-select and populate it in every row
(cruel, but I can see the logic). However what I want is for the
different values that I get from the sub-select to be entered into
the appropriate rows of column3.
I looked at using INSERT or REPLACE but the subselect (when run
standalone) returns 34001 rows, and table1 has 34004 rows - the
result is all 125000 rows of table2 being appended to table1 (with
NULLs in all but column3).
Neither table has a primary key and I'm running 3.3.17 on MacOSX 10.4.9
Is UPDATE the correct way to do this? Also, is there an SQLITE
chatroom on IRC?
Many thanks in advance.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------