Dear VFP user,
Please can someone help me with the next SQL statement:
SELECT p.perfkcmp, p.perpk, c.cervalid, MAX(c.cerinvalid) AS expiredate ;
FROM person p, certificate c ;
WHERE c.cerfkper = p.perpk ;
GROUP BY p.perpk ;
INTO CURSOR Cr_Temp
The question now:
In cursor Cr_Temp are records with the expiredate what is the maximum of c.cerinvalid but the information of c.cervalid is not from the record where the maximum is found.
How do I change the sql command so that c.cervalid and MAX(c.cerinvalid) come from the same record.
Nice regards,
Michelle.
Please can someone help me with the next SQL statement:
SELECT p.perfkcmp, p.perpk, c.cervalid, MAX(c.cerinvalid) AS expiredate ;
FROM person p, certificate c ;
WHERE c.cerfkper = p.perpk ;
GROUP BY p.perpk ;
INTO CURSOR Cr_Temp
The question now:
In cursor Cr_Temp are records with the expiredate what is the maximum of c.cerinvalid but the information of c.cervalid is not from the record where the maximum is found.
How do I change the sql command so that c.cervalid and MAX(c.cerinvalid) come from the same record.
Nice regards,
Michelle.