Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Linking tables correctly?
Message
 
À
07/12/1999 16:38:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00299996
Message ID:
00300509
Vues:
33
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform