Information générale
Catégorie:
Codage, syntaxe et commandes
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement