Erik, I didn't quite understand what you wanted to say. Neither about
RSQLite and new field (it seems that you use the same field in both
tables), nor about having data in the same table. Could you please
elaborate?


Pavel

On Thu, Jun 24, 2010 at 11:37 AM, Erik Wright <eswri...@wisc.edu> wrote:
> Hi Pavel,
> I need to transfer from another table because I am using an interface called 
> RSQLite.  With this interface there is no easy method for creating a new 
> field in a currently existing table.
> It sounds like it would be a quicker operation if the data were all in the 
> same table?  Is there another way I can speed up the execution time of this 
> expression?
> Thanks!,
> Erik
>
>
>>> (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
>
> _______________________________________________
> 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