The SQL is:
execute ('delete from HttpRequests where Date < ''2009-08-' + convert(nvarchar(max), 0) + '''')
The error is
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'convert'.
Commenting out the convert part removes the error. Whats wrong?