Cómo obtener la fecha de ayer en SQL
SELECT DATEADD(day, -1, CAST(GETDATE() AS date)) AS YesterdayDate;
Leo
SELECT DATEADD(day, -1, CAST(GETDATE() AS date)) AS YesterdayDate;