This may not be the most elegant, but it will work.  If you 
have a particularly large dataset, it may take a while.  This will remove ANY 
trailing comma, so if you have some that you want to keep, this will not work.  
Also, this will remove only one trailing comma per entry, so if you have an 
entry like MyData,,. Then the result will be MyData, not MyData.

UPDATE MyTable Set 
MyCol=IFEQ((SGET(MyCol,1,SLEN(MyCol))),',',(SGET(MyCol,(SLEN(MyCol)-1),1)),MyCol)

                                                                Jason

Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)

From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Thursday, February 05, 2015 3:25 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Trailing commas

Hi all

Imported a file and in a couple of the columns a trailing comma has appeared
with the data.

What would be the most elegant to remove these?

The SGET command is what I am finding.
Any advise would be appreciated.


Thanks
Anne

Reply via email to