General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select SQL works intermittently
I have a SELECT statement that queries 3 tables and sorts them into a cursor. My problem is that sometimes it works perfectly and at other times it doesn't select any records at all.
It may not help but the exact command even with my data and field names is:
SELECT Subjects.subjcode, Subjects.subjname, Attendnc.passed,;
Attendnc.att_part,Attendnc.absent, Attendnc.rpl,;
Attendnc.concldate, SPACE(60) AS lect_name, Attendnc.withdrawn,;
Attendnc.completed, Subjects.subject_id, Attendnc.enrol_id,; Enrolmts.su_stdate, Attendnc.memb_num, Attendnc.lect_num;
FROM attendnc INNER JOIN subjects INNER JOIN enrolmts;
ON Attendnc.enrol_id=Enrolmts.enrol_id;
ON Attendnc.subject_id=Subjects.subject_id;
WHERE Attendnc.course_id=CF.course_id .AND.;
Attendnc.memb_num=Stu2.memb_num .AND.;
ATTENDNC.ENROL_ID=CF.ENROL_ID .AND. &ATT_COND.;
ORDER BY Subjects.subjcode, Subjects.subject_id ;
INTO CURSOR ATTTMP
The settings: cf.course_id, cf.enrol_id, stu2.memb_num and att_cond are exactly the same each time, but sometimes it selects records and at others it selects none. Can anyone suggest what might cause this behavior in VFP5 SP3?
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