Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
I am working with a company who has developed a rather large database program to keep track of costs related to construction jobs. Unfortunately the vast majority of the program was developed by an accountant. To make matters worse he developed it in Access97. I am trying to recreate some of the programs functionality using VFP.
Since variables cannot be passed per-se in Access they created functions that store query criteria in a table and then retrieve them from within the query using a function called GetSystemDefaults(). When a user wants to retrieve all records they use a crieteria of "ALL".
My question arrises from the way they allow users to filter records in a query. The program will allow users to run a report using criteria such as specific job numbers or the user can run the report on all jobs.
It is my understanding that the easiest way to do this is to use the "like" operator and a wildcard "*" to specify all data or use a specific key number to narrow the results. The program creator somehow used a combination of grouping on the function that retrieves the query criteria and a cryptic combination of "AND" and "OR" operators to achieve the same results.
Am I simply off-base in my understanding of the filtering process?
Thank you for any enlightenment that could be offered
Kris Hokanson
"Never send an accountant to do a programmers job."
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement