Fix query used to fetch report(s) account is handling

This commit is contained in:
Keir Nellyer 2016-07-20 10:40:03 +01:00
parent 80f0113183
commit 5c3f78b428
1 changed files with 1 additions and 3 deletions

View File

@ -82,9 +82,7 @@ public class ReportRepository
private static final String GET_REPORTS_HANDLING = "SELECT reports.id FROM reports" +
" LEFT JOIN reportResults ON reports.id = reportResults.reportId" +
" INNER JOIN reportHandlers ON reports.id = reportHandlers.reportId" +
" WHERE reports.id = reportHandlers.reportId" +
" AND reports.id = reportResults.reportId" +
" AND reportResults.reportId IS NULL" +
" WHERE reportResults.reportId IS NULL" +
" AND reportHandlers.handlerId = ?;";
private static final String GET_USER_RESULT_COUNT = "SELECT COUNT(reports.id) AS resultCount" +