I set up a test table with text that had:
Hello" there
Hello"there
and then tried Denni's Update command without the Where clause. It updated
fine, with the results:
Hello"" there (changed)
Hello"there (not changed)
It worked without the where clause so you could try leaving that off, Bob,
unless you have a really large table and need a where clause for speed.
Karen
-----Original Message-----
From: Dennis McGrath <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Wed, Nov 13, 2013 5:19 pm
Subject: [RBASE-L] - RE: String replace
Copy my code exactly.
There is a space in there after the double quote.
quote-percent-dblquote-space-percent-quote
Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bob Thompson
Sent: Wednesday, November 13, 2013 5:04 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: String replace
Thanks, however the %"% pulls up all instances of the double quote in my case.
The % is the many character. So '%"%' would mean retrieve all records that
include a double quotes. I need only the records containing a double quote
with
a space immediately behind it
Bob Thompson
LaPorte, IN
219-363-7441
Sent from my iPod
On Nov 13, 2013, at 4:49 PM, Dennis McGrath <[email protected]> wrote:
> I'm assuming the quote you are searching for is the double quote and that
> your
rbase quote setting is the single quote
>
> This works for me as far as finding the double-quote followed by a space.
>
> browse all from testreplace where testreplace like '%" %'
>
> This does the update. In addition, it will not mess up if run again.
>
> update testreplace +
> set testreplace = (SRPL(testreplace,'" ','"" ',0)) +
> where testreplace not like '%"" %'
>
>
> Dennis McGrath
> Software Developer
> QMI Security Solutions
> 1661 Glenlake Ave
> Itasca IL 60143
> 630-980-8461
> [email protected]
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Bob Thompson
> Sent: Wednesday, November 13, 2013 4:30 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - String replace
>
> It is the simple things that sometimes stump me.
>
> I need to replace the following characters in text fields over many records.
>
>
> Example.
>
> 2-5/8" Long Dimension
>
> Needs to be
>
> 2-5/8"" Long Dimension
>
> I need to replace all ("space) with
> (""space)
>
> So far everything I have tried, ignores the space following the double quote.
>
> I have not even been successful in searching records to find which ones
contain the double quote followed by a space.
>
> I have used (char(32)) in several configurations but with no luck.
>
> Any thoughts appreciated.
>
> Bob Thompson
> LaPorte, IN
> 219-363-7441
>
>