On 8/28/2013 8:57 AM, Max Vlasov wrote:
the following query (notice the space at the end of the 3rd string)
Create table [TestTable] ([Title] TEXT);
INsert into TestTable (Title) VALUES ('simple text');
INsert into TestTable (Title) VALUES ('simple text');
INsert into TestTable (Title) VALUES ('simple text ');
select Trim(Title) as Title, Count(*) as Cnt FROM TestTable Group By Title;
produces two results
"simple text" "2"
"simple text" "1"
while all previous versions I tried a single one
"simple text" "3"
See the recent discussion at
http://comments.gmane.org/gmane.comp.db.sqlite.general/83005
It's not about trailing spaces, but about whether Title in GROUP BY
resolves to mean the table column or the alias. The correct behavior is
that exhibited by 3.8, and apparently by 3.7.15 and earlier: GROUP BY
should prefer the table column over the alias. There were a couple of
releases in between that behaved differently.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users