Einzelnen Beitrag anzeigen

Benutzerbild von Jens Schumann
Jens Schumann

Registriert seit: 27. Apr 2003
Ort: Bad Honnef
1.644 Beiträge
 
Delphi 2009 Professional
 
#3

Re: Problem mit stored Procedure und group by

  Alt 29. Aug 2005, 10:43
Hallo Hanso,
probiere es mal so:
SQL-Code:
SELECT SUM(K.MENGE), A.NR
FROM ART A RIGHT JOIN KSTAT K ON (A.ID = K.ID_ART)
WHERE (MONAT >= :VONMONAT) AND (MONAT <= :BISMONAT) AND (JAHR = :JAHR) GROUP BY A.NR
INTO MONATSMENGE;
evt hilft es auch wenn Du anstatt SUM(K.MENGE) lieber SUM(K.MENGE) AS Feldname schreibst.
Feldname sollte dabei dem Ziel Feld in der Tabelle MONATSMENGE entsprechen.
I come from outer space to save the human race
  Mit Zitat antworten Zitat