Re: [sqlite] trying to exclude records which have a field that is null

2013-02-02 Thread Keith Medcalf
> Mayhaps you mean: > > Select f.* >from firms f > left join (select firm_id, max(by_or_on) as boo > from calls > group by firm_id >having by_or_on is not null > order by by_or_on desc) c > on c.firm_id = f.id > order by

Re: [sqlite] select max(x), y from table

2013-02-02 Thread Igor Tandetnik
On 2/2/2013 6:46 PM, Gabor Grothendieck wrote: In 3.7.11 there was a change to support the feature in the subject which refers to guaranteeing that y comes from the same row having maximum x.. See: http://pages.citebite.com/o9y9n0p9neyt Did this or other change also enhance the having clause

Re: [sqlite] trying to exclude records which have a field that is null

2013-02-02 Thread Petite Abeille
On Feb 3, 2013, at 12:19 AM, e-mail mgbg25171 wrote: > "having by_or_on is not null " & _<==THIS ISN'T DOING IT FOR ME > AND I'D LIKE TO KNOW WHY Use a where clause ___ sqlite-users mailing list

Re: [sqlite] trying to exclude records which have a field that is null

2013-02-02 Thread Keith Medcalf
I'm surprised you are getting anything at all since the statement is semantically invalid. Select f.* from firms f left join (select firm_id, max(by_or_on) as boo from calls group by firm_id having by_or_on is not null order by

[sqlite] Double quotes in query

2013-02-02 Thread Klaas V
>Mohit wrote: >Can you use double quotes in the query? In this case no problem, double quotes are ignored around a tbl_name sqlite> create temp table "db..test"(c1 integer, c2); sqlite> insert into "db..test" values (1, 'sqlite_temp_master'); sqlite> insert into "db..test" values (2,

[sqlite] trying to exclude records which have a field that is null

2013-02-02 Thread e-mail mgbg25171
wSQL = _ "Select f.* " & _ "from firms f " & _ "left join " & _ "(" & _ "select firm_id, max(by_or_on) as boo " & _ "from calls " & _ "group by firm_id " & _ "having by_or_on is not null " & _<==THIS ISN'T DOING IT FOR ME AND I'D LIKE TO KNOW

Re: [sqlite] PRAGMA table_info documentation

2013-02-02 Thread Petite Abeille
On Feb 2, 2013, at 7:32 PM, chojra...@gmail.com wrote: > I'd like to ask about contents of last column in result of PRAGMA > table_info in SQLite 3.7.15.1 because it is not documented ( > http://www.sqlite.org/pragma.html#pragma_table_info). > It looks as if the value is '1', the column is in