I have a table that has a column (named 'synopsis') that is of datatype TEXT.
When I run the code below it does generate an e-mail and it does have an attachment. The attachment drops a lot of the data that is in the synopsis column.
Instead of "Select synopsis..." I have also tried "Select convert(varchar(max), synopsis)...
and gotten the same results.
Lastly, I created a temp table with a column of varchar(max) and put the data into that table and selected from it instead -- and got the same results.
@profile_name = 'KSP DB Mail',
@recipients = 'email@example.com',
@importance = 'High',
@subject = 'Post 1 Caselog db - Nibrs Nightly Data Errors ',
@body = 'We had a problem',
@query = 'Select synopsis from db_server.my_db.dbo.my_table',
@attach_query_result_as_file = 1