Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3/4 Table Join Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
3/4 Table Join Problem
Divers
Thread ID:
00432237
Message ID:
00432237
Vues:
50
This code works fine and returns 39k records (takes 12 seconds to run):
select ;
timeuserscnames.lastname , ;
timeuserscnames.frstname , ;
weektime.assoc_id , ;
weektime.workdate , ;
weektime.worktime , ;
weektime.aprvhrs ;
;
from force ;
ttreporter!weektime left join ttreporter!timeuserscnames ;
on timeuserscnames.assoc_id = weektime.assoc_id ;
;
;
where ;
weektime.workdate > {^2000.01.01} ;
;
order by ;
timeuserscnames.lastname
Now I have to add in a column from a 3rd table, and join it to the weektime table on the taskname column. No matter what I seem to do, I get a Cartesian Join condition and get 1 billion or so records.
select ;
timeuserscnames.lastname , ;
timeuserscnames.frstname , ;
timeuserscnames.assoc_id , ;
weektime.workdate , ;
weektime.worktime , ;
weektime.projname , ;
weektime.projstep , ;
weektime.taskname , ;
projtask.blineid ;
;
from ;
ttreporter!weektime left join ttreporter!timeuserscnames ;
on weektime.assoc_id = timeuserscnames.assoc_id ;
left join projtask ; 
on projtask.taskname = weektime.taskname ;
;
;
where ;
weektime.workdate > {^2000.01.01} ;
;
order by ;
timeuserscnames.lastname
Help?!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform