Subject | How to count the rows of a query result ? |
---|---|
Author | Frank |
Post date | 2006-09-02T08:38:14Z |
Maybe I worked to long but I have no clue how to solve this !
How can I count (in Firebird SQL) the number of rows returned by this
query ?
(I need to use this value in a stored procedure)
SELECT
AUTO_ID_CUSTOMER
, SUM(UNIT_QTY*UNIT_PRICE)
FROM V_TRANSACTIONS
WHERE INV_DATE > '01/01/2006'
GROUP BY AUTO_ID_CUSTOMER
HAVING SUM(UNIT_QTY*UNIT_PRICE) < 100000
How can I count (in Firebird SQL) the number of rows returned by this
query ?
(I need to use this value in a stored procedure)
SELECT
AUTO_ID_CUSTOMER
, SUM(UNIT_QTY*UNIT_PRICE)
FROM V_TRANSACTIONS
WHERE INV_DATE > '01/01/2006'
GROUP BY AUTO_ID_CUSTOMER
HAVING SUM(UNIT_QTY*UNIT_PRICE) < 100000