I want to get a date using an SQL statement. For instance, if the date is '2018-08-07' output this should return: '2018-08-14' (one week later). Then I'm going to get the total rows between these dates.
SELECT count(*) FROM orders WHERE dates BETWEEN '2018-08-07' AND DATEADD(day,7,'2018-08-07');
However, i get this error because of dateadd() function:
SQL Error  : Dynamic SQL Error; SQL error code = -104; Token unknown - line 1, column 1; DATEADD [SQLState:42000, ISC error code:335544634]