[sqlite] Illegal SQL not rejected

2016-05-02 Thread Hick Gunter
s.sqlite.org] Im Auftrag von John McKown Gesendet: Freitag, 29. April 2016 20:03 An: SQLite mailing list Betreff: Re: [sqlite] Illegal SQL not rejected On Fri, Apr 29, 2016 at 12:41 PM, Igor Korot wrote: > Hi, > > On Fri, Apr 29, 2016 at 1:28 PM, John McKown > wrote: > > On

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Jann Roder
> > > If a HAVING clause is specified, it is evaluated once for each group of > rows as a boolean expression . > If the result of evaluating the HAVING clause is false, the group is > discarded. If the HAVING clause is an aggregate expression, it is

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Marc L. Allen
select list. Only SUM(A) is. -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Igor Korot Sent: Friday, April 29, 2016 1:42 PM To: SQLite mailing list Subject: Re: [sqlite] Illegal SQL not rejected

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Jann Roder
Hi, It seems like a too obvious omission to not be intentional. But I wonder why a query like SELECT SUM(A) FROM TABLE GROUP BY B HAVING A <> 0 Is not rejected. MS SQL server gives you this error message in this case: Column ?A? is invalid in the HAVING clause because it is not contained in

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Igor Korot
age- > From: sqlite-users-bounces at mailinglists.sqlite.org > [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Igor > Korot > Sent: Friday, April 29, 2016 1:42 PM > To: SQLite mailing list > Subject: Re: [sqlite] Illegal SQL not rejected > > Hi, > >

[sqlite] Illegal SQL not rejected

2016-04-29 Thread Igor Korot
Hi, On Fri, Apr 29, 2016 at 1:28 PM, John McKown wrote: > On Fri, Apr 29, 2016 at 12:00 PM, Jann Roder > wrote: > >> Hi, >> It seems like a too obvious omission to not be intentional. But I wonder >> why a query like >> >> SELECT SUM(A) >> FROM TABLE >> GROUP BY B >> HAVING A <> 0 >> >> Is not

[sqlite] Illegal SQL not rejected

2016-04-29 Thread John McKown
On Fri, Apr 29, 2016 at 1:23 PM, Igor Korot wrote: > Marc, > > On Fri, Apr 29, 2016 at 1:50 PM, Marc L. Allen > wrote: > > That error is saying that you can't using HAVING on a column unless it's > in a group by or it's referenced in an aggregate in the HAVING clause > > > > You could say,

[sqlite] Illegal SQL not rejected

2016-04-29 Thread John McKown
On Fri, Apr 29, 2016 at 12:41 PM, Igor Korot wrote: > Hi, > > On Fri, Apr 29, 2016 at 1:28 PM, John McKown > wrote: > > On Fri, Apr 29, 2016 at 12:00 PM, Jann Roder > > wrote: > > > >> Hi, > >> It seems like a too obvious omission to not be intentional. But I wonder > >> why a query like > >>

[sqlite] Illegal SQL not rejected

2016-04-29 Thread J Decker
On Fri, Apr 29, 2016 at 10:00 AM, Jann Roder wrote: > Hi, > It seems like a too obvious omission to not be intentional. But I wonder why > a query like > > SELECT SUM(A) > FROM TABLE > GROUP BY B > HAVING A <> 0 > > Is not rejected. MS SQL server gives you this error message in this case: > >

[sqlite] Illegal SQL not rejected

2016-04-29 Thread John McKown
On Fri, Apr 29, 2016 at 12:00 PM, Jann Roder wrote: > Hi, > It seems like a too obvious omission to not be intentional. But I wonder > why a query like > > SELECT SUM(A) > FROM TABLE > GROUP BY B > HAVING A <> 0 > > Is not rejected. MS SQL server gives you this error message in this case: > >