Registriert seit: 11. Apr 2003
Ort: Moestroff (Luxemburg)
3.741 Beiträge
Delphi 2007 Professional
|
Re: [SQL] Problem mit doppelter Ergebnismenge
6. Okt 2004, 23:20
Hallo,
schon mal folgedendes Statement probiert:
SQL-Code:
SELECT i.position, pos.posbez,
SUM(i.jan) AS JAN, SUM(i.FEB) AS FEB, SUM(i.MAR) AS MAR, SUM(i.APR) AS APR, SUM(i.MAI) AS MAI, SUM(i.JUN) AS JUN,
SUM(i.JUL) AS JUL, SUM(p.AUG) AS AUG, SUM(p.SEP) AS SEP, SUM(p.OKT) AS OKT, SUM(p.NOV) AS NOV, SUM(p.DEZ) AS DEZ
FROM daten_ist i, daten_prognose p, positionen pos
WHERE i.position=p.position AND i.position=pos.posid and p.position = pos.posid
AND i.pagid IN ("PIM5231","PIM5244")
AND pos.pgid=2000
GROUP BY i.position,pos.posbez
(ungestet)
|
|
Zitat
|