I`m trying to use MySQL variable in Report Query but iReport accuses SQL syntax error. To use MySQL variable I should put SET @varname := value; Because of the semi colon I get a MySQL syntax error after the semi colon. " You have an error in your SQL syntax; ... near 'SELECT DATE_ADD(.....)' " Code:SET @num := -1;SELECT DATE_ADD('2009-08-24',INTERVAL @num := @num + 1 DAY) AS dayFROM log