Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 8152

Status
Not open for further replies.

hmcheung

Programmer
Joined
Oct 13, 2000
Messages
66
Location
HK
I want to do this:

update table_1
set col_1='ABC' + rtrim(col_2)


but I get this:

msg 8152
String or binary data would be truncated.
the statement has been terminated.


How can I get around this error?
Thanks! Please visit my WebCam!!
 
if you do:

select max(len('ABC'+rtrim(col2)))
then you will probably find that this is still greater than the length you have allowed for in col1, so simply increase col1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top