I am trying to select one numeric field from a table that is the largest but not larger than a limit and its record id. So far I get the partid from the last record not the max record... What am I doing wrong?
SELECT tmpParts.PartId, MAX(tmpParts.Length);
FROM tmpParts;
WHERE tmpParts.Cut = .F. AND tmpParts.Length < tmpMatList.NotUsed;
INTO ARRAY laPart
TIA