Hi Folks,
The idea behind the query is to get every address_line_1 that has 'Street' and use notepad to make them all 'St' instead. Inane, but someone must have it this way.
I can't get the following to run:
select 'update address set address_1 = ~' +address_1+ '~ where address_id = ~' + address_id + '~'
from address
where address_1 like '%Street%'
I get this error message:
Server: Msg 8115, Level 16, State 6, Line 1
Arithmetic overflow error converting varchar to data type numeric.
The address_id is a numeric column and address_1 a varchar. This same query works with the customer column instead of the address_id, but this is impractical because customers may have many addresses.
Advice?
The idea behind the query is to get every address_line_1 that has 'Street' and use notepad to make them all 'St' instead. Inane, but someone must have it this way.
I can't get the following to run:
select 'update address set address_1 = ~' +address_1+ '~ where address_id = ~' + address_id + '~'
from address
where address_1 like '%Street%'
I get this error message:
Server: Msg 8115, Level 16, State 6, Line 1
Arithmetic overflow error converting varchar to data type numeric.
The address_id is a numeric column and address_1 a varchar. This same query works with the customer column instead of the address_id, but this is impractical because customers may have many addresses.
Advice?