Task list database table
From TaskDepender
(→Design) |
(→Implementation) |
||
Line 33: | Line 33: | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
− | CREATE TEMPORARY TABLE TaskList | + | CREATE TEMPORARY TABLE TaskList AS |
− | + | SELECT *, | |
(SELECT COUNT(ContainerId) from Tasks where Tasks.ContainerId=t.Id)>0 | (SELECT COUNT(ContainerId) from Tasks where Tasks.ContainerId=t.Id)>0 | ||
OR | OR | ||
(SELECT COUNT(ContainerId) from Deliverables where Deliverables.ContainerId=t.Id AND Deliverable.CloneId=0)>0 IsContainer | (SELECT COUNT(ContainerId) from Deliverables where Deliverables.ContainerId=t.Id AND Deliverable.CloneId=0)>0 IsContainer | ||
− | FROM Tasks t WHERE ContainerId=(SELECT Value FROM StateVariables WHERE Key='CurrentContainerId') | + | FROM Tasks t WHERE ContainerId=(SELECT Value FROM StateVariables WHERE Key='CurrentContainerId') |
</syntaxhighlight> | </syntaxhighlight> | ||