Wenn das mit dem Cursor geht (wie von Andreas beschrieben), geht es dann vielleicht auch mit select into? (Das würde den Cursor sparen)
Code:
Exec Sql select xxwert into :wert from DateiA
where (xxa, xxb)
in(select yya, yyb from DateiB where feld=:FeWe)
group by xxwert
fetch first 99 rows only;
Der wesentliche Unterschied ist, dass ein "Select ... Into ..." ausschließlich maximal 1 Ergebniszeile erlaubt. Somit stellt sich das DIM-Problem da nicht.
The SELECT INTO statement produces a result table consisting of at most one row,
and assigns the values in that row to variables.
Only one row may be specified in the fetch-first-clause.
Bookmarks