I've been using email on my SQL 2005 box for a long time now...first time that I am trying to attach results from a query though. This exact code works fine on my SQL 2000 box. Syntax is still good. As soon as I add the @query option I get the following message:
Msg 22050, Level 16, State 1, Line 0
Memory allocation failure.
To rule out results size problems, for testing, I am simply returning 'SELECT 1'
Any ideas?