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



I've done exactly this same thing in OPNQRYF.  Used Peter's approach also.

| -----Original Message-----
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Walden H. Leverich
| III

| SQL!
| 
| I would build the SQL Statement dynamically. Something like:
| 
| Sql = 'select <the fields you need> from thefile 
|       where key1=key1value 
|       and key2=key2value 
|       and key3=key3value and '
| 
| If Field1Value <> ''
|       Sql = Sql + 'Field1 = Field1Value and '
| End IF
| 
| If Field2Value <> ''
|       Sql = Sql + 'Field2 = Field2Value and '
| End IF
| 
| ...
| 
| And then open and read the SQL. 
| 
| Keep in mind that using SQL does not negate the need for a good supply if
| logicals. The SQL will work with out any logicals, but if you want it to
| perform well you'll need a good supply of logicals with the 
| "correct" keys.
| "Correct" is dependent on the data you have in each of these fields. 




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.