Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A database challenge
Message
De
04/03/2008 03:21:17
 
 
À
04/03/2008 01:46:12
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01295541
Message ID:
01298365
Vues:
26
Two questions

first,....suppose, in the original example, all the user entered was 'NY' into the state textbox, and leaves all the other ones blank.

And let's even say that you're asking the user if they want a complete search, or 'begins with', or 'contains'....and that the user selects 'complete search'.

Am I correct in saying that you'd construct the following query...

"select firstName, lastname, Address, city, State, Zip from customers where state = 'NY'"


Second, suppose the user says 'exact match....state....NY'....and then 'contains....address....BLVD'. Am I correct in saying that you'd construct the following query and execute it?

"select firstName, lastname, Address, city, State, Zip from customers where state = 'NY' and address like '%BLVD%' "


Let me know if those are the two queries you'd construct, or if you'd do it differently.

Thanks,
Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform