Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is the sql's statement error
Message
De
18/10/2007 14:02:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01261866
Message ID:
01261903
Vues:
16
This message has been marked as the solution to the initial question of the thread.
here is the final release.. working
SELECT SUM(Cc.total), SUM(Cc.qtde), Cc.codigo;
 FROM cur_products as cc;
 GROUP BY Cc.codigo;
 ORDER BY 1 DESC, 2 DESC
thanks

Claudio

>>>You have to group on all fields behind '*' and any of them cannot be Memo or Blob
>>>
>>
>>same error
>>
>>
>>SELECT  SUM(qty) as tot_qty, SUM(tot) as sumt, client, codesy, qty, unit, tot, comiss;
>>		FROM cur_products;
>>	GROUP BY codesy;
>>	ORDER BY sumt  desc, tot_qty, desc;
>>		INTO cursor cur_prod_tot
>>
>>
>>
>
>Once again, you have to group on all none-aggregate fields
>
>SELECT  SUM(qty) as tot_qty, SUM(tot) as sumt, client, codesy, unit, comiss;
>...
>GROUP BY client, codesy, unit, comiss ;
>
>* if grouping on codesy only
>
>SELECT  SUM(qty) as tot_qty, SUM(tot) as sumt, codesy ;
>...
>GROUP BY codesy ;
>
>
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform