We have a script that creates the email body in html format, so that it can be sent with sp_send_dbmail
.
So I have three variables: @tableHTML1 varchar(8000)
, @tableHTML2 varchar(8000)
, @tableHtmlComplete varchar(max)
.
After the tsql script is executed, the len of @tableHTML1
is 4768, @tableHTML2
is 4594. Since the @body
parameter of sp_send_dbmail
can only receive one variable, I ended up doing set @tableHtmlComplete = @tableHTML1 + @tableHTML2
. Unfortunately, the len of @tableHtmlComplete
is 8000, since that's the max size of a varchar variable.
So what can I do in this case? I need to email the contents of @tableHTML1 plus @tableHTML2.
I will only consider another solution if what I'm trying to do above is not feasible.
Thanks.