× 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.



Do you want to return records that have the word "mor" in all of the fields
or any one of the fields.

If it's all of the fields:

SELECT * FROM Mytable WHERE field1 LIKE '%MOR%' AND field2  LIKE '%MOR%'
AND field3 LIKE '%MOR%'

if it is any one of the fields:

SELECT * FROM Mytable WHERE field1 LIKE '%MOR%' OR field2  LIKE '%MOR%' OR
field3 LIKE '%MOR%'

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


                                                                           
             "Booth Martin"                                                
             <booth@xxxxxxxxxx                                             
             om>                                                        To 
             Sent by:                  "Midrange Systems Technical         
             midrange-l-bounce         Discussion"                         
             s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>           
                                                                        cc 
                                                                           
             02/22/2005 09:12                                      Subject 
             AM                        SQL wildcard search                 
                                                                           
                                                                           
             Please respond to                                             
             Midrange Systems                                              
                 Technical                                                 
                Discussion                                                 
             <midrange-l@midra                                             
                 nge.com>                                                  
                                                                           
                                                                           




I am sure my terminology is wrong, but I would like to use SQLRPGLE to
choose all of the records in a file that have a certain group of letters in
any one of three fields.

for example, select the records that have "mor" in Field1, Field2, or
Field3
  This would return records that had the words more, moron, Mort, mortgage,
amore, smores, or mortuary in any one of those three fields.

I tried Where Field1 like %mor%  and that appeared to work, but I can't
figure out how to and/or the clause to choose Field 2 & Field3.


---------------------------------
Booth Martin
http://www.martinvt.com
---------------------------------
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.