Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter question
Message
De
21/06/2000 13:42:32
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Filter question
Divers
Thread ID:
00382816
Message ID:
00382816
Vues:
55
I have a view with Customer & CustomerProducts tables inside it. This view has this filter:
CustomerProduct.iProductID = ?vp_iProductID

which obviously will give me a list of all customers that own a certain Product. However, once in a while, I'd like to just show all Customers. Do I HAVE to make a new view? If the filter was based on a STRING instead of an Integer, then I could use a LIKE, and send in "%" whenever I wanted everything. But I can't use "%" here.

Any ideas?
The only dumb idea I could come up with was making two filter lines:
CustomerProduct.iProductID >= ?vp_iProductLowID AND
CustomerProduct.iProductID <= ?vp_iProductHighID


So if I want to show all customers with ProductID #3, just:
vp_iProductLowID = 3
vp_iProductHighID = 3

And if I wanted to show ALL customers:
vp_iProductLowID = 0
vp_iProductHighID = 999999999

(Now you know why I'm asking for a better solution :)
Dustin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform