Re: [sqlite] 3 tables in relation, really slow ...

2004-09-07 Thread Simon Berthiaume
Have you tried to change the order of the conditions in the WHERE clause? I don't know the internal working of SQLite so they might actualy give worst results. You can try something like that: SELECT date_ext.mydate as MyDate, city_ext.city as MyCity, number_ext.mynum as MyNumber FROM city_ext,

[sqlite] Query maximum JOIN

2004-08-11 Thread Simon Berthiaume
data, but not anymore. Thank you for your time. Simon Berthiaume

Re: [sqlite] A proposal for SQLite version 3.0

2004-04-07 Thread Simon Berthiaume
It might be true if you mostly store large quantities of NUMERICAL data (float, int, ...) since they are currently stored as strings (the value 1234567, would be stored using at least 7-8 bytes instead of 4). If you were in the same situation as I, where I use database mostly for strings, you

[sqlite] Feature of "FROM" clause

2004-03-22 Thread Simon Berthiaume
Hi, given the following tables: CREATE TABLE table_1(id INTEGER PRIMARY KEY,column VARCHAR(64)); CREATE TABLE table_2(id INTEGER PRIMARY KEY,column VARCHAR(64)); I realized that the following query isn't valid in SQLite: SELECT * FROM (

Re: [sqlite] Inner join problem

2004-03-09 Thread Simon Berthiaume
plaisir de pouvoir aider un confrère. Simon B. On Tue, 2004-03-09 at 09:00, Guillermo Fernandez Castellanos wrote: > Sweet... works right perfect. > > Can it be considered as a bug? > > Merci beaucoup! > > Guille > > Simon Berthiaume wrote: > > I think I

Re: [sqlite] Inner join problem

2004-03-09 Thread Simon Berthiaume
I think I know what the problem is. SQLite doesn't like having a table name following an openint parenthesis "(" in the FROM clause. Try the following statements instead: SELECT main.id, prim.primname, sec.secname FROM main INNER JOIN sec ON

Re: [sqlite] ORDER BY failure (?)

2004-02-11 Thread Simon Berthiaume
What behavior were you trying to achieve? Putting a conditional statement (test1 > 100) in a GROUP BY clause isn't valid SQL. Simon B. On Tue, 2004-02-10 at 17:54, Andox wrote: > Hello everybody. > > I have a question about the SELECT command with UNION ALL. > > When executing the

Re: [sqlite] qualified join

2004-01-23 Thread Simon Berthiaume
I had a similar problem recently, the way I solved it looks like that (it might not be pretty, but it works) SELECT t1.name, t2.deleted FROM t2 INNER JOIN ( SELECT t2.id, MAX(t2.time) AS last_time FROM t2 GROUP BY t2.id ) AS t3 ON t2.id =

Re: [sqlite] Query problem

2004-01-21 Thread Simon Berthiaume
that out. Simon Berthiaume On Mon, 2004-01-19 at 16:37, Simon Berthiaume wrote: > Maybe I used a too simplistic example. I have code that generates SQL > queries so users can request reports with various fields, various > criterias and various sorting orders. So technicaly there can b

Re: [sqlite] Query problem

2004-01-19 Thread Simon Berthiaume
( SELECT * FROM INSCLAIMS_CONCAT WHERE ( INSCLAIMS_CONCAT_FIELD_ID = 'INSCLAIMS_POLICYNO' ) ) AS T1 ON T1.INSCLAIMS_ID = T0.INSCLAIMS_ID ) ; Simon Berthiaume On Mon, 2004-01-19 at 12:52, D. Richard Hipp wrote: > Simon Berthia

[sqlite] Query problem

2004-01-19 Thread Simon Berthiaume
ess" in queries? Simon Berthiaume

[sqlite] Bug or "feature" in sqlite_exec?

2004-01-19 Thread Simon Berthiaume
er and we understand it may come at the expense of RAM usage. So please no comment on how I could re-write the query. If anyone can tell me why sqlite_exec behaves like that, it would be appreciated. Simon Berthiaume