At 08:40 AM 6/20/2003 -0600, Troy Sosamon wrote:
After looking at the data closer, I think this will work as long as I check the 4th char is a dash. About 90% of the numbers are 123-4567 and the other 10% are 1234567. I can do this with 2 selects. One select where (sget(ph_num,1,4)) = '-' and using the sget method and one select pulling the # straight where <> '-'
Troy,
In that case, try:
UPDATE TableName SET PhoneNo = +
(IFEQ(SLEN(PhoneNo),8, (SGET(PhoneNo,3,1))+(SGET(PhoneNo,4,5)),(SGET(PhoneNo,3,1))+(SGET(PhoneNo,4,4))))
That will take care of both possibilities.
Have Fun!
Very Best R:egards,
Razzak.

