Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid Group By issue (what fields to include)
Message
 
 
À
24/05/2006 16:35:16
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01124674
Message ID:
01124688
Vues:
8
This message has been marked as the solution to the initial question of the thread.
>Ok, but does that mean that I include all the fields I mentioned? What about the IIF that uses two fields? Or do I use numbers for every column I'm going to create that is not a SUM?
>

select iif(field1=3,field2,field1) as expr1, field2, sum(field3) as sum from myTable group by 1,2

For all non aggregate column you should put them into Group by. You can not use Memo field in your select.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform