Hallo Fuerchau,

jetzt habe ich meine Logik umgebaut aber nur wird mir mitgeteilt das Schlüsselwort 'OPEN' wird nicht erwartet. Ich glaube ich habe mich völlig verrannt.

DECLARE C1 DYNAMIC SCROLL CURSOR WITH HOLD FOR SELECT artikel.artikel_nr,
ifa_art.darreich_form
from jenne/artikel,Jenne/ifa_art
WHERE artikel.zentral_nr = ifa_art.zentral_nr and
current timestamp between artikel.gueltig_von and gueltig_bis and
artikel.darreich_form = ' ' and ifa_art.darreich_form <> '---'
ORDER BY ifa_art.gueltigkeit desc

open C1
repeat
fetch first from c1 into :artikelnr,:darform
if sqlcod = 100 then
end repeat
else
update jenne/artikel set Darreich_form = darform
where artikel_nr = :artnr
end if
close c1

Gruß
Jenne