SELECT * FROM mytable ; WHERE state = m.myState ; ORDER BY sequence, eff_date DESC ; INTO CURSOR myCursorAt first I tried doing it by creating an index expression which would allow me to
SEEK m.myState SCAN WHILE mytable.state = m.myState etc.but I never could get the index expression quite right. The sorted table should look like
State Sequence Eff_date Other Fields AL 1 01/02/2002 .............. AL 1 01/02/2001 .............. AL 1 01/02/2000 .............. AL 2 01/02/2000 .............. AL 3 01/02/2001 .............. AL 3 01/02/2000 .............. NY 1 01/02/2001 .............. TX 1 01/02/2001 .............. TX 1 01/02/2000 .............. TX 2 01/02/2000 .............. TX 2 01/02/1999 .............. etc.Thanks to all........Rich