- Thanks received
- 34
Is there a way to get the number of result rows returned and use that number as a footer?
e.g.
I've tried using rownum, but it doesn't give me total number of rows output, only total number of rows in the current select statment (i.e. 1).
e.g.
Code:
SELECT 'HEADER - HEADER ROW HERE' FROM DUAL
UNION ALL
SELECT A,B,C
FROM MY_TABLE
UNION ALL
SELECT 'FOOTER - TOTAL NUMBER OF ROWS RETURNED =' <INSERT ROW COUNT HERE> FROM DUAL
I've tried using rownum, but it doesn't give me total number of rows output, only total number of rows in the current select statment (i.e. 1).
