Wie wär's damit:
ggf. ist noch eine zusätliche Common Table Expression erforderlich wegen des GROUP BYsCode:With x as select Rank() Over(Partition By Artikel order By Artikel, Charge Desc) lfd artikel, charge from datei group by Artikel, Charge Select * From X Where Lfd between 1 and 3;
Birgitta
Bookmarks