Jim, you are probably going to want to also employ the string manipulation using a while statement. This will allow you to look at each row independently but using the same rule.
I have found if you write out some of the conditions of what you are trying to do, you can then employ the correct sequence for removing the data. Example. 1. All the data is at the beginning of the text. 2. The data is consistent in length or varies in length 3. There is a space or special character the separates the data from the rest of the information. Or will the data be based on the length of the data in your reference column. 3. I would use a while loop to step thru each row testing the length of the data and removing. 4. Trim the data as a last step to make sure you have removed any spaces at the beginning or end. Everyone has a different approach. I like to be specific enough to affect only the part of the data I want to remove. If it is the first x number of characters, then that is what I would work on. The string manipulations in RBase are fantastic. If you can describe it, you can find a function to do it. As you can see there are many ways to accomplish the goal. Gary _____ From: [email protected] [mailto:[email protected]] On Behalf Of Jim Belisle Sent: Saturday, February 20, 2010 11:00 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: deleting portion of text I appreciate the input. I had been looking at the data manipulation functions Razzak mentioned before going to the list. Here is what I have: All the information I want to remove from each row is at the beginning of each row. All the information is different (as far as the characters are concerned). All the information is text. I will be able to group the information (so I update many rows at a time) based on another field in each row. In each of the groups the number of characters I remove will depend on the other field in the same row so I will be able to use a WHERE clause. Jim _____ From: [email protected] [mailto:[email protected]] On Behalf Of Bob Thompson Sent: Saturday, February 20, 2010 10:53 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: deleting portion of text If the data is the exact same and starts in a certain place, you can use one of the two options... Sample Data: "xxxxxThis is a Test" If all rows started with "xxxxx" you could.. Update tablename set column = (SGET(columname,200*,6)) where (Sget(columnname,5,1)) = 'XXXXX' This would set the column to its value minus the first 5 characters. *200 can be adjusted to column width if desired. Sample Data : "This is xxxxx a Test" Update tablename set columnname = (SRPL(columname,'XXXXX','',0)) where columnname contains 'XXXXX' This would remove the xxxxx if the first characters are to be retained. Note that xxxxx string would be replaced everywhere though. -Bob ----- Original Message ----- From: Jim Belisle <mailto:[email protected]> To: RBASE-L Mailing List <mailto:[email protected]> Sent: Saturday, February 20, 2010 10:29 AM Subject: [RBASE-L] - deleting portion of text I want to delete a portion of a bunch of information at the beginning of 1200 rows of data. What function would I use to accomplish this? Jim

