(Gast)
n/a Beiträge
|
Re: select statement
16. Jun 2009, 10:55
Hallo,
hilft Dir das?
SQL-Code:
select Rezept, Sum(Si) As Si, Sum(Fe) as Fe, Sum(Cu) As Su from (
select Rezept, Element,
case Element when 'Si' then wert else 0 end as Si,
case Element when 'Fe' then wert else 0 end as Fe,
case Element when 'Cu' then wert else 0 end as Cu
from Rezepte
where gruppe = 'ABC' and Rezept in ('Si','Fe','Cu')
) intern
group by rezept
|
|
Zitat
|