July 22, 2003 at 1:24 pm
I want to replace the first part of a string (41331111 to 55551111).
Table name: 'ITEM' ,col:'CTLG_NO' ,
look on bol. need a little more help
THANKS
July 23, 2003 at 3:32 am
Is this what you want?
update ITEM
set CTLG_NO = replace(CTLG_NO,'55551111','41331111')
test it first though
Growing old is mandatory, growing up is optional
July 23, 2003 at 4:13 am
hi,
shouldn't it be :-
update ITEM
set CTLG_NO = replace(CTLG_NO,'41331111','55551111')
from 41331111 to 55551111 ?
Paul
July 23, 2003 at 4:15 am
Yes it should, i forgot to switch the two values back round after a bit of testing. Thanks for pointing that out.
Growing old is mandatory, growing up is optional
July 23, 2003 at 3:32 pm
Thanks thats almost it but I need to keep the last four digits '1111. I looking to replace the first four digits only.
41331111 55551111
41331112 55551112
41331113 55551113
dont know if a like statment will do?
July 24, 2003 at 1:36 am
Hi,
just use :-
update ITEM
set CTLG_NO = replace(CTLG_NO,'4133','5555')
instead (see replace in BOL for an explanation)
Paul
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply