At one time, the ''  didn't work with SRPL.  I remember that whenever it was 
introduced I knew immediately that I could use that!
Karen
 
 
 
-----Original Message-----
From: mike.ramsour <[email protected]>
To: rbase-l <[email protected]>
Sent: Thu, Jan 16, 2020 3:34 pm
Subject: Re: [EXT] Re: [RBASE-L] - Removing embedded spaces from a text string

Just a follow-up to the previous.

I tried the suggested approach and itworked very well.  I did one pass through 
the data looking for 5 spacesand then did one more pass looking for 2 spaces.

Command example:  UPDATE TEST_TABLESET NEW_COMMENTS = (SRPL(COMMENTS,'     
','',0)) WHERE COMMENTSLIKE '%     %'

Problem solved.

Thank you so much.


Mike Ramsour
AK Steel Coshocton Works
Quality Department
Phone:  740-829-4340
Cell:  740-502-1659



From:       "'Karen Tellef'via RBASE-L" <[email protected]>
To:       [email protected]
Date:       01/16/2020 04:16 PM
Subject:       [EXT] Re: [RBASE-L]- Removing embedded spaces from a text string



You can't get SRPL to work? This iswhat I would do:

set var vtext2 = (SRPL(.vtext, '     ', '',0))

What that is:  the first part in the quotes I justspaced 5 times.  The second 
part is just two single quotes togetherwith nothing between.

I've done this before with an UPDATE command.  Createanother column to hold the 
result and do repeated UPDATEs until there'sno more values with the extra 
spaces.  Of course you'd have to havean idea of how many UPDATEs you would need 
to take care of the extra spaces.


Karen




-----Original Message-----
From: mike.ramsour <[email protected]>
To: rbase-l <[email protected]>
Sent: Thu, Jan 16, 2020 1:03 pm
Subject: [RBASE-L] - Removing embedded spaces from a text string

Good afternoon:

What's the best way to remove embedded spaces from text strings?

I have a column named COMMENTS that contains text prose similar to this:

'COLD MILL CHATTER                               VERY LITE'

I want to remove any occurrence of 2 or more spaces in a row so that Iend up 
with a value like this: 

'COLD MILL CHATTER VERY LITE' 

I have experimented with the various TRIM functions as well as SRPL buthave not 
had any success yet. 

I'm looking for the same functionality as the TRIM () function in Excel.

Any help is greatly appreciated. 

Best regards. 

Mike Ramsour 
AK Steel Coshocton Works 
Quality Department 
Phone:  740-829-4340 
Cell:  740-502-1659 
Confidentiality Notice
This message is intended exclusively for the individual or entity to whichit is 
addressed and may contain privileged, proprietary, or otherwise 
privateinformation. 
If you are not the named addressee, you are not authorized to read, 
print,retain, copy or disseminate this message or any part of it. If you 
havereceived this message in error, please notify the sender immediately 
bye-mail and delete all copies of the message.
-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google 
Groups"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, sendan email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/OF633DC4EF.8B6FCEE6-ON852584F1.0067DC43-852584F1.0068B53F%40aksteel.com.--
 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google 
Groups"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, sendan email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/372186748.14679710.1579209383931%40mail.yahoo.com.
Confidentiality Notice
This message is intended exclusively for the individual or entity to which it 
is addressed and may contain privileged, proprietary, or otherwise private 
information. 
If you are not the named addressee, you are not authorized to read, print, 
retain, copy or disseminate this message or any part of it. If you have 
received this message in error, please notify the sender immediately by e-mail 
and delete all copies of the message.
-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/OFF5BE31CD.AF3259B0-ON852584F1.00761AAB-852584F1.00768150%40aksteel.com.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/173767968.14696081.1579211762564%40mail.yahoo.com.

Reply via email to