Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Help
Message
From
09/08/1999 09:18:13
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
09/08/1999 09:10:20
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00251416
Message ID:
00251423
Views:
10
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?
>
>
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform