>> (2)  Update the old table (t1) using this expression:
>> UPDATE OR REPLACE t1 SET f1 = (SELECT f1 FROM t2 WHERE t2.row = t1.row) WHERE
> t1.row IN (SELECT row FROM t2)
>
> 1. I dont think that "WHERE t1.row IN (SELECT row FROM t2)" is necessary

It is necessary. Otherwise all other rows will be updated with NULL value.


Erik, what is the purpose of creating t2? Why don't you update rows in
the t1 itself instead of inserting into t2?


Pavel

On Wed, Jun 23, 2010 at 2:17 PM, Oliver Peters <oliver....@web.de> wrote:
> Erik Wright <eswri...@...> writes:
>
>
>> (2)  Update the old table (t1) using this expression:
>> UPDATE OR REPLACE t1 SET f1 = (SELECT f1 FROM t2 WHERE t2.row = t1.row) WHERE
> t1.row IN (SELECT row FROM t2)
>
>
> 1. I dont think that "WHERE t1.row IN (SELECT row FROM t2)" is necessary
>
> 2. maybe you should do a little textprocessing and build a file with the
> necessary statements and
>
> start with <BEGIN TRANSACTION;>
>
> 1.000.000 ;-) UPDATE OR REPLACE ...;
>
> and end with <COMMIT>
>
> [...]
>
> greetings
> Oliver
>
> _______________________________________________
> 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

Reply via email to