hello,
I am trying to build a query that will go through an address column in my table and locate street type abbreviations and replace them with the full value for example 123 Main St I want to show as 123 Main Street or 456 Ocean Ave as 456 Ocean Avenue. I've tried using a REPLACE statement but I get an error:
Msg 8152, Level 16, State 13, Line 1
String or binary data would be truncated.
The statement has been terminated.
My statement is:
UPDATE STUDENT SET MAILADDR = REPLACE(MAILADDR, 'st', 'Street')
From what I have read on the 8152 message, its a result of a value being to large for the field size. I have queried all of the values in the column and none would exceed the max field size even after adding the extra characters.
Does anyone have a better way of handling this type of update statement?
Thanks
I am trying to build a query that will go through an address column in my table and locate street type abbreviations and replace them with the full value for example 123 Main St I want to show as 123 Main Street or 456 Ocean Ave as 456 Ocean Avenue. I've tried using a REPLACE statement but I get an error:
Msg 8152, Level 16, State 13, Line 1
String or binary data would be truncated.
The statement has been terminated.
My statement is:
UPDATE STUDENT SET MAILADDR = REPLACE(MAILADDR, 'st', 'Street')
From what I have read on the 8152 message, its a result of a value being to large for the field size. I have queried all of the values in the column and none would exceed the max field size even after adding the extra characters.
Does anyone have a better way of handling this type of update statement?
Thanks