Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SQL statement
Message
From
23/09/1999 08:09:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00267805
Message ID:
00267913
Views:
17
SELECT iif(nvl(Checkinout.lflag,.F.),"Y","") as lflag,;
Tapelib.ntapeid, Tapelib.ctitle, Tapelib.ddatep_a, Tapelib.cttyp,;
Tapelib.ctrt, Projects.cproj_num, Projects.cproj_title,;
Projects.cproducer, Projects.cclient, Tapelib.clanguage, Tapelib.cformat,;
Tapelib.ccategory, Tapelib.lcc, Tapelib.mnotes, Tapelib.ctl_index;
FROM rsrc!projects INNER JOIN rsrc!tapelib;
LEFT OUTER JOIN rsrc!checkinout ;
LEFT OUTER JOIN rsrc!featper ;
ON Tapelib.ctl_index = Featper.ctl_index ;
ON Tapelib.ctl_index = Checkinout.ctl_index ;
ON Projects.cmaster_index = Tapelib.cmaster_index;
WHERE &running; && I construct this interactively
GROUP BY Tapelib.ntapeid;
ORDER BY Tapelib.ntapeid;
INTO CURSOR search

This works fine (i.e. the lflag "Y") but a query for featured persons (featper)
yields no results. If I flip the LEFT JOIN statements, featper works, but lflag fails. You will notice that featper is NOT a selected field. I use the found results (search) and set a relation into the featper.dbf so I can present them on a grid as I scroll through the (search) records.

Two other follow-on questions:
1. For some unknown reason my progress thermometer only pops up at 100% completion. I set no code to control this, but it was working fine yesterday,
i.e. it showed progress.

2. Queries that contain only (projects) info run really slow, but I assume this is due to the JOINS.

Thanks for you time
Bruce Covey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform