Hi,
Ich habe momentan ein Query das richtige Ergebnisse gebt aber ist er keine shön Losung zur diese ?
SELECT SUM(arvp),SUM(arpens),SUM(arswt),SUM(argrvz),SUM(arejp)+SUM(arejpsys),SUM(arwtv),SUM(arvorming),sum(arak)
FROM v_prestaties
WHERE id = ANY(sIds::int[]) and bid=nBid and va_rsznum=sRsz
INTO v1,v2,v3,v4,v5,v6,v7,v8;
afAmounts[0] := v1;
afAmounts[1] := v2;
afAmounts[2] := v3;
afAmounts[3] := v4;
afAmounts[4] := v5;
afAmounts[5] := v6;
afAmounts[6] := v7;
afAmounts[7] := v8;