... so habe ich es gelöst.
Code:
CREATE OR ALTER PROCEDURE PSYS_TAB_RECORDS_COUNT
RETURNS (
TAB_NAME VARCHAR(31),
REC_COUNT INTEGER)
AS
BEGIN
FOR SELECT TRIM(RDB$RELATION_NAME)
FROM RDB$RELATIONS
WHERE (RDB$VIEW_BLR IS NULL)
AND (RDB$SYSTEM_FLAG = 0)
AND SUBSTRING(RDB$RELATION_NAME FROM 1 FOR 3)
NOT IN ('SYS','IMP','LOG','TEM','DUA')
ORDER BY RDB$RELATION_NAME
INTO :TAB_NAME
DO
BEGIN
EXECUTE STATEMENT 'SELECT COUNT(*) FROM ' || TAB_NAME
INTO :REC_COUNT;
SUSPEND;
END
END
und dann so Abfragen
SELECT *
FROM PSYS_TAB_RECORDS_COUNT
Gruß
Borwin