Get row count of current SQL query
Posted on 2016-10-04
Can you advise how to get the number of rows returned by the current SQL query?
example code below returns 4 rows, I'd like to add a column called "row count" or similar which has a value of 4 in it:
SELECT geo,Ste,CodeName,ReturnTrimMMNumber,Warranty,SUM(NetSales) AS NetSalesTotal
WHERE ReturnTrimMMNumber IN('933256')
GROUP BY geo,Ste,CodeName,ReturnTrimMMNumber,Warranty