Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL Tricks
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00244102
Message ID:
00244104
Vues:
19
>Hi All,
>
>I want to group items in a report by not a field but
>a part of field. For example useid is 12 digit number
>and 5th to 6th position indicate the are of this user.
>I want put sql code like Group by substr(userid,5,2).
>I tried that but VFP 6 does not seem to like it.
>Column not found error message comes on. Off cause
>this could be FoxFire's(I am beta testing Fox Fire)
> limitation that I don't know about.
>May be my approach is not permissable. If so is there
>any trick I can use to achieve this end.
>Thanks for your help always.
>
>Aiko Ichimura

select substr(UserID, 5, 2) as IDGroup, UserID from ... group by 1

But if you do this you only have 1 UserID returned for each IDGroup
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform