Works no matter where the '-' is as long as there is only one.
Beginning Table Values:

R>sel * fro sometable
 PhNo
 ------------- 
 12-34567
 123-4567
 1234-567

R>Upd Sometable set PhNo = ((Sget(PhNo,((sloc(PhNo,'-')) - 1), 1)) +
(Sget(PhNo,((Slen(PhNo))-(sloc(PhNo,'-'))),((sloc(PhNo,'-'))+ 1)))) where PhNo cont '-'
 Columns have been updated in 3 row(s) in SomeTable

Resulting Values:
R>sel * fro sometable
 PhNo
 ------------- 
 1234567
 1234567
 1234567

Reply via email to