Home Forums SQL Server 7,2000 T-SQL date comparison help RE: date comparison help
James Horsley
Hall of Fame
Points: 3196
More actions
February 5, 2005 at 7:57 am
#540813
SELECT * from t Where year(t.testdate)=(year(getdate())-1) and month(t.testdate)=month(getdate())
James HorsleyWorkflow Consulting Limited