Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big Problem in Alpha sort using Stored Procedures
Message
De
06/03/1999 09:22:33
 
 
À
05/03/1999 19:05:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00194739
Message ID:
00194836
Vues:
21
>Can someone help me with my problem? I have a table consisting of LName C(20) GName C(20) Grade C(2)
> && Note: Grade contains mixed of Alpha and Numeric
>I am trying to sort my table using a function inside my Stored Procedure which will alphasort combining grade and name
>
>My function inside the Stored Proc goes like this:
>
>Function asort
> DO CASE
> case grade="1"
> nretval = 10
> case grade="2"
> nretval = 12
> case grade="3"
> nretval = 14
> case grade="1b"
> nretval = 20
> ENDCASE
> cOrder = ALLT(STR(nRetVal) + UPPER(ALLT(Lname)+ALLT(gName))
>RETURN cOrder
>
>I noticed that if u return an Character it wont sort properly but if u return a numeric the sorting goes well.
>Someone have an idea about This... Thanks. I reallt appreciate ur reply.
>
>
>
>This is only a sample table that i can come up.

this is the reason for bintoc()
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform