Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
3/4 Table Join Problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
3/4 Table Join Problem
Miscellaneous
Thread ID:
00432237
Message ID:
00432237
Views:
49
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?!
Next
Reply
Map
View

Click here to load this message in the networking platform