Commit 86c73cbf authored by Michael Ritter's avatar Michael Ritter
Browse files

Coalesce the colgroup value with an empty string

parent 9ae6cb21
...@@ -61,9 +61,10 @@ public class SummaryQuery { ...@@ -61,9 +61,10 @@ public class SummaryQuery {
final String LE_BEFORE = "AND l1.date < ? "; final String LE_BEFORE = "AND l1.date < ? ";
// Collection Join // Collection Join
//Use coalesce in case the colgroup is null - prevents errors with the constructor
// Gets the colgroup so that we can display it // Gets the colgroup so that we can display it
final String COL_JOIN = "JOIN ( " + final String COL_JOIN = "JOIN ( " +
" SELECT id, name, colgroup FROM collection "; " SELECT id, name, COALESCE(colgroup, '') AS colgroup FROM collection ";
final String COL_JOIN_GROUP = "WHERE colgroup = ? "; final String COL_JOIN_GROUP = "WHERE colgroup = ? ";
final String COL_JOIN_END = ") AS c " + final String COL_JOIN_END = ") AS c " +
"ON l1.collection_id = c.id "; "ON l1.collection_id = c.id ";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment