troubleshooting Question

SQL Server - HTML in text column, data truncating - need work around

Avatar of Cognize
Cognize asked on
Microsoft SQL Server 2005Microsoft SQL Server 2008
10 Comments2 Solutions294 ViewsLast Modified:

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.
Database Consultant
Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros