General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only