Dario Schmidt schrieb:
> My new version:
> ClassMethod newsAnz() As %Integer
> {
&sql(SELECT count(%ID) INTO :anz FROM News WHERE titel=NULL)
w " Entries with no titel = ",anz,!
> &sql(SELECT count(titel) INTO :anz FROM News)
> Quit anz
> }
>
> This works, but if I use count(%ID), I get 10 as result.
> But the right one is 6. Do you understand this?
Try SELECT COUNT(*) FROM News.
That should be the most "correct" answer.