On Fri, Apr 29, 2016 at 10:00 AM, Jann Roder <j.roder at wintoncapital.com> 
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:
>
> Column ?A? is invalid in the HAVING clause because it is not contained in 
> either an aggregate function or the GROUP BY clause.
>
> It's not even clear to me what SQLite does with a query like that.
>

OMG MSSQL should not be the standard for 'error'
There is certainly nothing wrong logically with that statement, nor abiguity.


Like select option_id from option_map join option_value on
option_map.option_id=option_value.option_id

ERROR: abiguous option_id  .  IF it chose either one aribrarily just
on a 'command not found, shall I fake it?' sort of methodology, it's
the same value.

or adding an order by requires me to specifuy each and every column
explcitly instead of allowing *'  (sorry this explation if vague, I
don't really understand why it's an error, I just give up and do it
the way MSSQL wants, MySQL would certainly have no issue with it, nor
I suspect does sqlite.



> Jann
>
>
>
>

Reply via email to