Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Curious query behavior
Message
From
21/02/2001 16:25:13
 
 
To
16/02/2001 13:21:05
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00476726
Message ID:
00478169
Views:
20
Hello John

When you created your preliminary queries did you remember to use the NOFILTER option int the select statement.

If not then the smaller of your 2 preliminary cursors may not have a disk presence.

If this does not work then try using different names for all the cursors in the faulty process, on the basis that this is the only thing that is now different between the faulty process and the working process.



>I have 2 SQL queries on local tables. They essentially do the same thing, one for active customers, one for inactive. Both get their results from 2 preliminary queries and 2 local tables. They both have the following in the where clause (include customers in the county list or in the zip code table):
>
> (AT(ALLTRIM(co_county) + ",",cCountyList)>0 OR ;
> SUBSTR(in_zip,1,5) IN ;
> (SELECT Zip FROM hcfa_zip))
>
>My question is this: This works fine in the first query (active). It does not work in the second. If I take the condition on either side of the OR by itself, it works fine in both queries. The county list and zip tables are the same for each. The active query includes an additional condition after this that the inactive does not. Is there anything in the query itself or the preliminary queries (order, etc.) that could affect this? I have matched everything I can in the 2 queries, and have tried different things with the preliminary queries, but to no avail. I can modify the code to get the right result. I’m just curious why it works on one and not the other (what affects the results).
>
>TIA
>
>John
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform