>Don't you just need an ordering field based on Grp_Name? >SELECT Grouper(grp_name) AS Grouper, etc. ORDER BY Grouper, Subseq >where >Grouper is a UDF >FUNCTION Grouper >LPARAMETER GrpName >DO CASE >CASE m.GrpName = "input" > RETURN "01" >CASE m.GrpName = "cables" > RETURN "02" >MORE > >ENDCASE >Charlie > >>I have a table that contains numerous fields among which are<BR> grp_name and subseq in the following order: >> >>grp_name subseq >>input 1 >>cables 2 >>education 3 >>cables 4 >>education 5 >>cables 6 >>input 7 >> >>The problem I'm having is that the resulting cursor from the select <BR>must be ordered by grp_name (not alpahbetically but in the order they <BR>appear) and then by subseq in order ie: >> >>grp_name subseq >>input 1 >>input 7 >>cables 2 >>cables 4 >>cables 6 >>education 3 >>education 5 >> >>I have tried various combinations of Group By and Order By to no <BR>avail. Any ideas? >> >>