Mike,

Load to matching table in RBase (5-80 char col)

Create your 400 char col in another table

Insert into YourNewTable (BigCol) sel (col1+col2+col3+col4+col5) 
from YourFirstTable

Set v Counter INT = 100

While Counter > 0 Then
  Update YourNewTable set BigCol = (srpl(BigCol,'  ',' ')) 
  Set v counter = (.counter - 1)
EndWhile

Sloc would be better to detect more than one contiguous blank, but 
it doesn't seem to be able to distinguish that string.... Srpl does 
what it should, but always reports back updating every row in the 
table regardless... thus the counter.

fwiw

Ben Petersen


On 9 Oct 2001, at 15:16, Ramsour Mike wrote:

> Is there an efficient way of deleting extraneous embedded spaces in a text
> string?  The STRIM function deletes trailing spaces but I'd like to replace
> extra spaces within a text string to just one space character.  The TRIM
> function in Excel, for instance, says it will "Removes all spaces from a
> text string except for single spaces between words."
> 
> My specific situation is that I am loading an R:Base table with a fixed
> field file from our VAX-based business system.  The file contains five
> 80-character text fields that contain comments.  I'd like to load this into
> one 400-character text field in R:Base and then be able to remove all the
> extra spaces.
> 
> Any suggestions are greatly appreciated!
> 
> Mike Ramsour
> Technology Department
> AK Steel Coshocton Works
> 17400 SR 16
> Coshocton, OH  43812-0190
> 
> Voice:  (740) 829-4340
> FAX  :  (740) 829-4211
> 
> 


Reply via email to