× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David FOXWELL wrote:

Well, it's really quite simple. I've put a contrôle in an
RPG program so that users can't put certain characters in
the names of clients.

I wanted to run the SQL using the same characters to get
all those clients which have one of these characters in
their name. After installation of the control, if a user
tries to work with one of these clients, he will be
obliged to correct the name before going any further.

SELECT * from clients
where translate( name
, ' '
, '-ABCDEFGHIJKLMNOPQRSTUVWXYZ&'''
) <> ' '

Notice they added the hyphen and the apostrophe, no
accents, no numbers, no *,etc. This listed 5400 clients.


FWiW the given expression can be applied to the table as a CHECK CONSTRAINT if the rule [for what characters can be included in the string] is important to enforce outside of the noted RPG program control.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.