Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL Tricks
Message
De
21/07/1999 15:44:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00244102
Message ID:
00244311
Vues:
19
Aiko,

>>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. <<

Foxfire! makes it easy to provide this kind of grouping. You just need to add a item to the data dictionary that uses your SUBSTR expression as the new data item's expression. It's also a good idea to use the table alias in the expression, so use:

SUBSTR(tablealias.userid,5,2)

... where "tablealias" is the alias as specified for the item in the dictionary.

Once this item is created, you can use it when creating Foxfire! reports. Foxfire! has a sorting and grouping dialog that allows you do select which items to Group By. Foxfire! will then automatically generate the SQL with the appropriate Group By clause.

Bill
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform