0

UPDATE ASSIGNMENTS SET CBTURL = REPLACE(CBTURL, 'http://172.21.130.19/', 'https://testlpsweb.corp.mbll.ca/Content/')

The above statement produces "Data truncation" error. Please advise why and how to correct it.

Error starting at line : 1 in command - UPDATE ASSIGNMENTS SET CBTURL = REPLACE(CBTURL, 'http://172.21.130.19/', 'https://testlpsweb.corp.mbll.ca/Content/') Error at Command Line : 1 Column : 1 Error report - SQL Error: Data truncation

  • 4
    Possible duplicate of [SQL Server String or binary data would be truncated](https://stackoverflow.com/questions/6388756/sql-server-string-or-binary-data-would-be-truncated) – Obsidian Age Nov 15 '17 at 22:24

1 Answers1

0

I'm guessing that CBTURL column length is to small for resulting string of replace. Could you try to alter column to have larger lenght. Try this query to see maximum resulst string lenght:

Select Max(Len(REPLACE(CBTURL, 'http://172.21.130.19/', 'https://testlpsweb.corp.mbll.ca/Content/'))) from tablename ....
MRsa
  • 621
  • 4
  • 8