I'ld like to remove a value from a string by updating the field.
The value can be at the begin or end or anywhere in the string because the field is feed with multivalues like this : ;1; if only one value, ;1;15; if two or more values.
The purpose in my case is to remove this value ;15; (easy if only one value because i only have to update with '' (blank) but if two values or more i have to do this ...
;1;15; should become ;1; and if ;15;1; it shoud become ;1; as well so i have to remove in fact always 15; except when this is the only value in the field
Could you improve my code ?
SET CONT$MEMBERSHIP.F_CODE_MAILING = ???
WHERE CONT$MEMBERSHIP.K_CONTACT NOT IN (SELECT RPUBLCONT.K_CONTACT FROM ADMINEFFICY.R_PUBL_CONT AS RPUBLCONT WHERE RPUBLCONT.K_PUBLICATION = 2279) AND
CONT$MEMBERSHIP.F_CODE_MAILING LIKE ('%;15;%')