
Originally Posted by
JoshJohnson
I agree with you, it makes no sense when looking at it from the standard POV of how a database works, and yes it has something to do with Sims, which I'm afraid leaves the only option of raising a ticket at
SupportNet as TimH did and hoping for the best
There's not really a way to do it! I think you're imagining a query like this:
Code:
SELECT s.studentname, s.reg
FROM studentsview AS s
WHERE NOT EXISTS
(SELECT resultvalue FROM resultsview AS R
WHERE r.aspectid="Some Aspect Id"
AND r.studentid=s.studentid);
whereas what's actually happening is more like this:
Code:
SELECT s.studentname, s.reg, r
FROM studentsview AS s LEFT JOIN resultsview2 AS r
ON (s.studentid=r.studentid);
resultsview2:
SELECT * FROM resultsview
WHERE resultsview.aspectid="Some Aspect Id"
AND resultsview.resultvalue IS NULL;
There are no null result values! So all that happens is you get a list of all the students matching the criteria you want, along with a blank result.
The way round it, is not to filter on a null value! You can filter the result for aspect name, resultset, etc.; after that, either just display a count of results, or select the result value, and then you can sort the output afterwards to display either students with 0 results, or with a blank value (depending on how you've set up the report).
It might be that the new reporting engine changes all this, but we'll see!
Doing it the other way round is much easier - you can untick the "Include records with no such results" box, but there's no equivalent to get the disjoint set.