Hi folks,
Find below the query that fetches the previous month data only
Select * from EmpJD
Where evaluations.quality_date >= DATEADD(MONTH, DATEDIFF(MONTH, 31, getdate()), 0)
AND evaluations.quality_date < DATEADD(MONTH, DATEDIFF(MONTH, 0, getdate()), 0)
Find below the query that fetches the previous month data only
Select * from EmpJD
Where evaluations.quality_date >= DATEADD(MONTH, DATEDIFF(MONTH, 31, getdate()), 0)
AND evaluations.quality_date < DATEADD(MONTH, DATEDIFF(MONTH, 0, getdate()), 0)
No comments:
Post a Comment