Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQL works intermittently
Message
From
02/09/1999 03:51:19
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00260063
Message ID:
00260490
Views:
15
All my tables were always open - I checked all that out completely. The nested structure came from the CREATE QUERY command, so I've just used it as is in my code - I'll go back and re-examine my other queries.

>I seem to remember it works when all the tables in the SQL were already open before executing the SQL. I have not experimented with the *why* success is intermittent. I just know that it will be a cold day in August in Dallas before I use a nested join.
>
>>Thanks. That has solved the problem, but do you have any idea why the nested joins would work sometimes and not others?
>>
>>
>>>Start by un-nesting the JOINs.

>>>
>>>SELECT Subjects.subjcode, ...
>>> FROM attendnc ;
>>> INNER JOIN subjects ;
>>> ON Attendnc.subject_id=Subjects.subject_id;
>>> INNER JOIN enrolmts;
>>> ON Attendnc.enrol_id=Enrolmts.enrol_id;
>>> WHERE ... conditions
>>> ORDER BY Subjects.subjcode, Subjects.subject_id ;
>>> INTO CURSOR ATTTMP
Previous
Reply
Map
View

Click here to load this message in the networking platform