Re: [sqlite] optimizing a multiple select statement

2008-11-24 Thread Christophe Leske
> insert or ignore into idlookup > select * from ( > select * from cl1 > UNION ALL select * from cl2 > UNION ALL select * from cl3 > UNION ALL select * from cl4 > UNION ALL select * from cl5 > ) > where (lomi>13.96 and loma<13.96 and lami>53.23 and lama<53.23); > Thanks, but

Re: [sqlite] optimizing a multiple select statement

2008-11-22 Thread Igor Tandetnik
"Christophe Leske" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sorry if this is trivial, but is there no way to do something like: > > insert into idlookup > ( > ( > select * from cl1 > UNION select * from cl2 > UNION select * from cl3 > UNION select * from cl4 > UNION select *

[sqlite] optimizing a multiple select statement

2008-11-22 Thread Christophe Leske
Hello, i am doing this request and was wondering if I can coerce it, as all tables of the subset (the cl* tables) all have the same fields. As you can see, i need to sort them by lomi,loma,lami,lama and ID. insert into idlookup select * from cl1 where (lomi>13.96 and loma<13.96 and lami>53.23