SQLServerCentral » Latest topics
Possible to add a Total for Amount at the end of each day?
[code language="sql"]DECLARE @Yesterday DATETIME = DATEADD(DAY,-1,CAST(GETDATE() AS DATE));
DECLARE @PeriodStart DATETIME = DATEADD(DAY,-6,@Yesterday),
@PeriodEnd DATETIME = CAST(GETDATE() AS
DECLARE @PeriodStart DATETIME = DATEADD(DAY,-6,@Yesterday),
@PeriodEnd DATETIME = CAST(GETDATE() AS
No comments:
Post a Comment