SELECT * FROM buchvorgang v1 WHERE 
typ='AR' AND 
NOT EXISTS (SELECT 1 
FROM buchvorgang v2 
WHERE v1.Nummer=(v2.Nummer-1) 
  AND v1.Typ=v2.typ);


SELECT * FROM beleg v1 WHERE 
NOT EXISTS (SELECT 1 
FROM beleg v2 
WHERE v1.fortlaufendenummer=(v2.fortlaufendenummer-1));