SQL Server - HTML in text column, data truncating - need work around
Posted on 2009-12-23
I have inherited a system where emails have to be sent from a database table on an SQL 2000 server. The emails are in html format and therefore fairly long.
I am having to build the email text in sql, and then insert it into a table for sending at a later date. The problem is that I cannot get the data into the column (data type text) without it truncating. At first I thought the problem was that the max length had been reached for the row.
I have now tried a couple of work arounds such as inserting the data into a table on a linked SQL 2005 server, but still find that the data is truncated, even with less columns in the row.
I'm now wondering if the issue is the row length, or some other limit I'm hitting. Whatever way I go about it, I have to pass the data from a table or temporary table on the SQL 2000 server. Could this be where the data is being truncated.
I thought that you could have columns longer than 8060 bytes in SQL 2005 - am I right in this assumption?
Any advice appreciated.