If there's at most one dash in the number: Set v resultstring = (ifeq(sloc(teststring,'-'), 0, teststring, sget(teststring,sloc(teststring,'-')-1,1) + sget(teststring,99,sloc(teststring,'-')+1)))
Regards, Stephen Markson ForenSys The Forensic Systems Group www.ForenSys.ca 416 482 2140 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Troy > Sosamon > Sent: June 20, 2003 10:29 AM > To: RBASE-L Mailing List > Subject: [RBASE-L] - RE: SRPL > > The problem is they are not all the same. > Some look like 123-4567, some are 1234567, and who know what other > variations of junk. > > I was thinking about trying to nest the sloc function and use the sget > to > make it work. > > Troy > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ramsour > Mike > Sent: Friday, June 20, 2003 8:22 AM > To: RBASE-L Mailing List > Subject: [RBASE-L] - RE: SRPL > > > Troy: > > Maybe you've thought of this already but just in case . . . Have you > tried > using the SGET function? If the numbers are all formatted the same or > with > just a few variations you could do > > SET VAR vphone TEXT = '123-4567' > -- > SET VAR vnew_phone TEXT = (SGET(.vphone,3,1) + SGET(.vphone,4,5)) > -- > SHOW VAR v%phone > -- > RETURN > > You may need a couple of variations on this or first test for the > existence > of a dash using the SLOC function. Another option that just occurred > to me > would be to load the data into an Excel file and use its REPLACE > function. > You can use it to strip out characters. Hope that helps. > > Mike Ramsour > Voice 740-829-4340 > > -----Original Message----- > From: Troy Sosamon [mailto:[EMAIL PROTECTED] > Sent: Friday, June 20, 2003 10:14 AM > To: [EMAIL PROTECTED] > Subject: [RBASE-L] - SRPL > > > > > > > Has anyone figured out how to use SRPL to not only remove a character, > but > the spact too. > I need a function that will strip the dashes out of phone numbers. > > 123-4567 needs to come back 1234567. > > I can loop through and process on character at a time, but I would > really > like to be able to get the results in a select w/o having to do that. > > Thanks, > > Troy

