: MIDRANGE dot COM Mailing List Archive

RE: Select client from clients where name<>OK


AddThis Feed Button



-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Dennis Lovelady
If you got this for legitimate business purposes, congratulations.
Seriously. In that case, would you care to share how/why you
put this into practice? 'Cuz I'm really curious.

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.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2010 by MIDRANGE dot 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 here. If you have questions about this, please contact