Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Help
Message
De
09/08/1999 09:18:13
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
09/08/1999 09:10:20
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00251416
Message ID:
00251423
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform