
June 16th, 2004, 09:26 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Error when using Replace and Update
I am trying to replace the carriage returns and line feeds from a varchar field with a <br> tag using the following query:
UPDATE tmpJobImport
SET job_desc = replace (replace(job_desc, char(10),''), char(13), '<br>')
I receive an error that says "string or binary data would be truncated" and cannot update the field. The field is large enough to hold the update and I can run the exact command in a select statement and get the results back.
SELECT REPLACE(REPLACE(job_desc, CHAR(10), ''), CHAR(13), '<br>') AS testField
FROM tmpJobImport
Any thoughts on why I might be getting this error? I can run the update with just a '<>' or 'br', but not '<br>'.
Thanks,
Dean
|