Hai Seven,
das sollte eigentlich gehen:
Delphi-Quellcode:
var
summe1 : Real;
summe2 : Real;
begin
query1.close;
query1.sql.text :='select count(*) as gesamt from lager where regal=1';
query1.open;
summe1 := Query1.FieldByName ('gesamt').AsFloat;
query1.close;
query2.close;
query2.sql.text :='select count(*) as anzahhl from lager where regal=1 and menge>0';
query2.open;
summe2 := Query1.FieldByName ('anzahl').AsFloat;
query2.close;
label1.caption := FloatToStr (100 / summe1 * summe2);
end;
Stephan B.
"Lasst den Gänsen ihre Füßchen"