Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql group by clause is invalid or missing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00991464
Message ID:
00991469
Vues:
19
This message has been marked as the solution to the initial question of the thread.
SET ENGINEBEHAVIOR 80

SELECT E.iid                     AS 'iempl' , ;
       NVL( P.iPlanPauseID , 0 ) AS 'plpid' ,;
       SUM( H.n120 + H.n100 )    AS "nsum";
       FROM Employee E;
       INNER JOIN Horaire H  ON  E.iid = H.iemployeeid ;
       INNER JOIN PAUSE P ON P.iid = H.cpauseid  ;
       WHERE MONTH(H.ddate) = 2 AND YEAR(H.ddate) =  2005 AND E.iid = 127;
       GROUP BY 1,2;
UNION;
       SELECT E.iid              AS 'iempl' , ;
       NVL( P.iPlanPauseID , 0 ) AS 'plpid' ,;
       SUM( H.n120 + H.n100 )    AS "nsum";
       FROM Employee E;
       INNER JOIN Horaire H  ON  E.iid = H.iemployeeid ;
       INNER JOIN PAUSE P ON P.iid = H.cpauseid2  ;
       WHERE MONTH(H.ddate) = 2 AND YEAR(H.ddate) = 2005 AND E.iid = 127;
       GROUP BY 1 , 2;
INTO CURSOR Temp
You missed the first SQL GROUP BY clause
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform