SELECT SUM(csProfit) FROM tblCurrencySale WHERE csDate BETWEEN @startdate AND @enddate
create PROCEDURE usp_CurrencyProfit @STARTDATE datetime, @ENDDATE datetime AS BEGIN SET NOCOUNT ON; SELECT ISNULL( SUM ( csProfit ) , 0 ) FROM tblCurrencySale WHERE csDate BETWEEN @STARTDATE AND @ENDDATE END GO
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)