View Single Post
Quote:
Originally Posted by RobTrew View Post
Well the former should raise an error, because "childrenCount" is ambiguous - the task and context tables both have a childrenCount field ...

(Did I ask you what version of OS X you are running ? It begins to feel as if there is a different version of Sqlite running here ...).

On the other hand, the other fields are not ambiguous, so if you can get this slightly modified version to run, you should be fine:

Code:
select \" Available actions\", count(*) 
from (task t left join context c on t.context=c.persistentIdentifier) 
where (projectInfo is null) and (t.childrenCount=0) and (dateCompleted is null) 
and (blocked=0) and (effectiveContainingProjectInfoActive=1) 
and (blockedByFutureStartDate=0) and ((context is null) 
or ((allowsNextAction=1) and (active=1)));
Anyway, I salute you for diving into the code ...

Nope, that doesn't work. I get:

Code:
SQL error: no such column: t.childrenCount