General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only