I have working SQL to count number of rows returned.
When I insert a WHERE clause for VT(Vermont), the correct 4 rows are returned, but the row count is still a huge number. (I was expecting the count to be 4 to match the 4 rows returned.)
Can anyone suggest SQL to count number of rows returned AFTER the WHERE clause is applied?
Thanks. Milt.
SELECT
brnNumber AS brnNumber, brnCity AS brnCity, x.rc
FROM branchlocations,
(
SELECT
count(*) AS rc
FROM branchlocations
)
AS x
WHERE brnState = 'VT'
----------------------------------
Simply delete the WHERE line and all rows are returned. But the row count is always the same...the entire table, about 800.
-----------------------------------
When I insert a WHERE clause for VT(Vermont), the correct 4 rows are returned, but the row count is still a huge number. (I was expecting the count to be 4 to match the 4 rows returned.)
Can anyone suggest SQL to count number of rows returned AFTER the WHERE clause is applied?
Thanks. Milt.
SELECT
brnNumber AS brnNumber, brnCity AS brnCity, x.rc
FROM branchlocations,
(
SELECT
count(*) AS rc
FROM branchlocations
)
AS x
WHERE brnState = 'VT'
----------------------------------
Simply delete the WHERE line and all rows are returned. But the row count is always the same...the entire table, about 800.
-----------------------------------