Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a BUG?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Is this a BUG?
Divers
Thread ID:
00798818
Message ID:
00798818
Vues:
53
I read carefully what the help sais about SET ENGINEBEHAVIOR 70 | 80 & what are the diferences between VFP 7.0 & 8.0 in GROUP BY clause. Help sais"

********
The GROUP BY clause must list every field in the SELECT list except for fields contained in an aggregate function, such as the COUNT( ) function. In addition, the GROUP BY clause must also list every field in a HAVING clause except for fields contained in an aggregate function.
*********

I have the following example:
CLOSE DATABASES ALL
CREATE TABLE DooSumi (NadvDoo N(14,2), SumaDoo N(14,2), Mes N(2), God N(4), Egn C(10))
CREATE TABLE AddSum (Bruto N(14,2), Mes N(2), God N(4), Egn C(10))
INSERT INTO DooSumi (NadvDoo, SumaDoo, Mes, God, Egn) VALUES (100, 50, 2, 2003, "1111111111")
INSERT INTO DooSumi (NadvDoo, SumaDoo, Mes, God, Egn) VALUES (120, 50, 2, 2003, "1111111111")
INSERT INTO DooSumi (NadvDoo, SumaDoo, Mes, God, Egn) VALUES (120, 50, 2, 2003, "1111111111")

INSERT INTO AddSum (Bruto, Mes, God, Egn) VALUES (100, 2, 2003, "1111111111")

SELECT SUM(NadvDoo + SumaDoo) + NVL(AddSum.Bruto,0) AS All_Nadv;
FROM DooSumi;
LEFT JOIN AddSum ON DooSumi.Egn+STR(2003,4)+STR(2,2) == AddSum.Egn + STR(AddSum.God,4)+STR(AddSum.Mes,2);
WHERE DooSumi.Egn == "1111111111" .AND. DooSumi.Mes == 2 .AND. DooSumi.God == 2003;
GROUP BY DooSumi.Egn, DooSumi.Mes, DooSumi.God;
INTO CURSOR TempDoo

and VFP 8.0 rises the error SQL: GROUP BY clause is missing ot invalid"
when I remove "+NVL(AddSum.Bruto, 0)" everything is OK. I thing the All_Nadv Field in TempDoo IS agregate, but maybe I am wrong ???
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform