I have a basic query:
SELECT dtCreated , bActive , dtLastPaymentAttempt , dtLastUpdated , dtLastVisit FROM Customers WHERE (bActive = \'true\
DECLARE @Firstdate DATE='2016-04-01', @LastDate DATE=GETDATE(),/*get today date*/ @resultDay int=null SET @resultDay=(SELECT DATEDIFF(d, @Firstdate, @LastDate)) PRINT @resultDay