SELECT AreaFK, StationFK, CrewFK, ; > MIN(IIF(EMPTY(nextminor),{^9999/12/31}) AS NextMinor, ; > MIN(IIF(EMPTY(nextmajor),{^9999/12/31}) AS NextMajor, ; > .F. AS doMinGroup, .F. AS doMajGroup ; > FROM premaint GROUP BY 1,2,3 ORDER BY 1,2,3 ; > INTO TABLE maintdue
ISBLANK()
vs. EMPTY()
is one place where my dBase roots show. And the idea of using a constant will speed the execution time. Thanks for the code review; it's been helpful.