diff --git a/reportbuilder/classes/local/aggregation/base.php b/reportbuilder/classes/local/aggregation/base.php index 3997e02bef7..c6b3b1d3706 100644 --- a/reportbuilder/classes/local/aggregation/base.php +++ b/reportbuilder/classes/local/aggregation/base.php @@ -96,6 +96,9 @@ abstract class base { // We need to ensure all values are char (this ought to be done in the DML drivers, see MDL-72184). switch ($DB->get_dbfamily()) { + case 'mssql' : + $sqlfield = $DB->sql_concat("''", $sqlfield); + break; case 'postgres' : $sqlfield = "CAST({$sqlfield} AS VARCHAR)"; break;