On 9/16/2012 9:17 AM, John Clegg wrote:
I have a table Members with 896 rows and a text field "Year2012". It
contains "Paid" 156 times, "Comp" 13 times and the rest are null (confirmed
in sqlitebrowser as "empty")

Back in the olden days when this table was in Access, select
count("Year2013") from Members used to return 169. In LibreOfiice with the
data stored in embedded HSQL it returns 169. In LibreOffice connecting to
sqlite3 it returns 896.

Any ideas please?

Read the documentation?   http://sqlite.org/lang_aggfunc.html

"The count(X) function returns a count of the number of times that /X/ is not NULL in a group. The count(*) function (with no arguments) returns the total number of rows in the group. "


HTH,

Gerry

PS  Note that it is count(X) and not count("X")
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to