Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A database challenge
Message
From
04/03/2008 03:21:17
 
 
To
04/03/2008 01:46:12
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01295541
Message ID:
01298365
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform