Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUPing headache
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
GROUPing headache
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01434114
Message ID:
01434114
Vues:
102
Hi all
I have data similar to the following:
OrderID, Date, FromLoc, ToLoc, Passengers, Rate
I run the following query:
select left(dtos(date),6) as CurMonth, FromLoc, ToLoc, count(OrderID) as Orders, Avg(Passengers), Sum(Rate) ;
from myTable where .... order by 1,2,3 group by 1,2,3
Works great, but in fact, the problem is i would like to have one row per trip, ie id like to have in the same line if i have FromLoc=x ToLoc=y or FromLoc=y and Toloc=x
Any idea how to do this?
TIA
Jaime
Why do programs stop working correctly as soon as you leave the Fox?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform