Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking tables correctly?
Message
 
To
07/12/1999 16:38:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00299996
Message ID:
00300509
Views:
32
Try this:


select course.courseid, courseinstruc.instructor, sum(tempcourse.stdcount) as stdtotal;
from course left join courseinstruc on course.courseid = courseinstruc.courseid,;
tempcourse;
where course.courseid = tempcourse.courseid and !empty(courseinstruc.instructor);
into table temporary
group by courseinstruc.instructor

Then do:

select course.courseid, courseinstruc.instructor, sum(tempcourse.stdcount) as stdtotal;
from course left join courseinstruc on course.courseid = courseinstruc.courseid,;
tempcourse;
where course.courseid = tempcourse.courseid and empty(courseinstruc.instructor);
into cursor temporary2
group by course.courseid

Then just append the results from one query on the end of the other query.

Like:

sele temporary
appe from temporary2
Rip Ryness
International Falls, MN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform