[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    [sqlite] New column in select will not mask column of the same name in having clause and sqlite won'
From:       Tomas Telensky <tomas.telensky () gmail ! com>
Date:       2014-12-28 16:46:08
Message-ID: 20141228164608.GV58486 () artax ! karlin ! mff ! cuni ! cz
[Download RAW message or body]


Hi,

here is a bug report as posted here: http://stackoverflow.com/q/27678468/684229

I got this query in sqlite

select kvadrat, datum, count(distinct kontrola) as pocet
from b
group by kvadrat, datum
having pocet > 1

The problem was that pocet was actually a column in table b and I didn't
notice, and the having clause was using the table column instead of the
newly derived column specified in select clause.

So far so good, but sqlite should at least issue any warning, right?

PS: I am using sqlite using sqldf package in R (version 0.4-7.1). Package
RSQLite 0.11.4. According to its description the SQLite engine should be
version 3.7.17.

Regards,

	Tomas

-- 
Pomozte nám chránit ptáky – staňte se členy ČSO! 
www.birdlife.cz/prihlaska.html
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic