Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building a complex query
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00980679
Message ID:
00980692
Views:
64
Did You have some user input to get what the user needs for that query? i.e. some TextBoxes?


>>Hi Colin,
>>
>>Can you loop through the fields checking to see if there !empty and building the WHERE clause on the fly.
>>
>>How are you building these queries?
>>
>>Jon
>>
>>>Hi
>>>
>>>I am trying to work out the code for the following
>>>
>>>I have 12 query fields - any or all may contain values - I only want SQL to run the query on those fields where the query field is non blank
>>>
>>>eg Town = New York Country = USA zipcode (blank)
>>>
>>>The query would only work on town and country since the zipcode field is blank
>>>
>>>Alternatively I might have to run a number of queries one after using the results from query 1 as the source data for query 2 - is there any way I can do this?
>>>
>>>Thanks
>>>
>>>Colin
>
>
>Jon
>
>Yes I could - it's what I'm looking for - can you give me an example of how to build the where clause on the fly?
>
>Thanks
>
>Colin
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform