If you have a relation between the tables:
SCAN WHILE USERID = gUser FOR workpkg.rec_type='C'
The brute force way is:
SELECT UserProj
SCAN WHILE UserID = gUser
SELECT WorkPkg
LOCATE FOR ... && whatever field is in both tables
SELECT UserProj
IF WorkPkg.Rec_Type="C"
* Do the processing
ENDIF
ENDSCAN
You could also use a SEEK() instead of the SELECT - LOCATE - SELECT, if you have the right index tag.
The idea is that while you are on a certain record in UserProj, you go point to the corresponding record in WorkPkg to see if your condition is met.
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