dbTalk Databases Forums  

Re: Purge funny characters

comp.databases.pick comp.databases.pick


Discuss Re: Purge funny characters in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Excalibur
 
Posts: n/a

Default Re: Purge funny characters - 03-19-2007 , 04:10 PM






Hi
Yup! that got the grey matter working. The light dawned as I worked on the
tomatoes.
Was that one of Jim's ?
Peter McMurray
"Chandru Murthi" <cmur_xyz_thi (AT) xyz_seeinggree_xyz_n (DOT) net> wrote

Quote:
Wow, tricky, didn't notice that! Eliminates controls as well.

Wonder if jbase has a switch to reverse that syntax to the uv form?

Chandru

"Terry Layne" <usenet (AT) laynesoftware (DOT) com> wrote in message
newsan.2007.03.18.22.37.59.663459 (AT) laynesoftware (DOT) com...
jBASE uses that syntax. The inner CONVERT leaves you with bad chars and
the outer CONVERT eliminates them.

-Terry

On Sat, 17 Mar 2007 16:22:41 +0000, Chandru Murthi wrote:

Just curious: you have CONVERT(NAME, GOOD.CHARS, '') to convert all
good.chars to nulls. Which system has this syntax, because on UV its:
CONVERT(GOOD.CHARS, '',NAME)?

I won't ask why you're replace "good" characters with nulls to
eliminate
them

Chandru
"Terry Layne" <usenet (AT) laynesoftware (DOT) com> wrote in message
newsan.2007.03.17.03.32.51.18599 (AT) laynesoftware (DOT) com...
On Tue, 27 Feb 2007 13:34:38 +0000, Allen Egerton wrote:

diets wrote:
Hi all

I need to remove funny characters from a string, and presently do it
as follows:
[snip]

* Initialization
GOOD.CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
GOOD.CHARS := 'abcdefghijklmnopqrstuvwxyz'
GOOD.CHARS := '0123456789'
GOOD.CHARS := " " ;* Space

* Get/define string to clean up.
NAME = 'THIS IS THE STRING WITH )(*&*& THE FUNNY && CHARACTERS @#IN
IT'

[snip]

After you get GOOD.CHARS you can do

NAME = TRIM(CONVERT(NAME, CONVERT(NAME, GOOD.CHARS, ''), ''))


--
Terry Layne
Portland, OR


--
Terry Layne
Portland, OR






Reply With Quote
  #12  
Old   
Jim Idle
 
Posts: n/a

Default Re: Purge funny characters - 03-19-2007 , 07:15 PM






On Mar 19, 8:23 am, "Chandru Murthi"
<cmur_xyz_thi (AT) xyz_seeinggree_xyz_n (DOT) net> wrote:
Quote:
Wow, tricky, didn't notice that! Eliminates controls as well.

Wonder if jbase has a switch to reverse that syntax to the uv form?

Chandru
IIRC I think that it may well be emulation dependant, though I think
it is UniVerser that has it the worong way around, but then maybe they
got that from Prime and we got our syntax from Reality, and... I no
longer remember. But overall the CHANGE and CONVERT statements and
functions are supersets of everyone else's CONVERT and CHANGE, in that
they will do everything everyone else's does and a few more things.
They also operate in place if the compiler/runtime detectst that the
source and target variables are the same, which makes them extremely
fast if you are removing things.

Jim



Reply With Quote
  #13  
Old   
frosty
 
Posts: n/a

Default Re: Purge funny characters - 03-22-2007 , 11:29 AM



Jim Idle wrote:
Quote:
They also operate in place if the compiler/runtime detectst that the
source and target variables are the same, which makes them extremely
fast if you are removing things.
I assume you meant to write "...variables are the same length..."
correct?

--
frosty




Reply With Quote
  #14  
Old   
Excalibur
 
Posts: n/a

Default Re: Purge funny characters - 03-22-2007 , 04:14 PM



Hi Frosty
Isn't it wonderful how a simple statement can be construed by different
people. I thought that he meant if the variable name was the same. So we
have original string in FRED and we want to put the corrected string back in
FRED so he does it in the same buffer.
Peter McMurray


"frosty" <frostyj (AT) bogus (DOT) tld> wrote

Quote:
Jim Idle wrote:
They also operate in place if the compiler/runtime detectst that the
source and target variables are the same, which makes them extremely
fast if you are removing things.

I assume you meant to write "...variables are the same length..."
correct?

--
frosty





Reply With Quote
  #15  
Old   
frosty
 
Posts: n/a

Default Re: Purge funny characters - 03-22-2007 , 06:13 PM



English can be ambiguous, even when all the words are there.

Your interpretation makes sense, and is probably what he meant,
but... only for CONVERT, where the result will be the same length
or shorter than the input, not for CHANGE, where it can be longer.

--
frosty

Excalibur wrote:
Quote:
Hi Frosty
Isn't it wonderful how a simple statement can be construed by
different people. I thought that he meant if the variable name was
the same. So we have original string in FRED and we want to put the
corrected string back in FRED so he does it in the same buffer.
Peter McMurray


"frosty" <frostyj (AT) bogus (DOT) tld> wrote in message
news:cq6dnfBx3oXQIZ_bnZ2dnUVZ_uuqnZ2d (AT) centurytel (DOT) net...
Jim Idle wrote:
They also operate in place if the compiler/runtime detectst that the
source and target variables are the same, which makes them extremely
fast if you are removing things.

I assume you meant to write "...variables are the same length..."
correct?

--
frosty



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.