Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inefficient query
Message
From
27/01/2007 15:38:46
 
 
To
26/01/2007 16:24:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01188966
Message ID:
01189878
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
>This appears to suggest I should somehow construct the query on the fly based on what criteria were filled in. If so, whats a good way to proceed?

That makes sense. I tend to write this kind of code like this:
cWhere = ""
IF NOT EMPTY(m.cCriterion)
   cWhere = m.cWhere + "SomeField = " + m.cCriterion
ENDIF

...

SELECT ... ;
  FROM ... ;
  WHERE ... AND &cWhere ;
  INTO CURSOR Result
Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform