I have a table which I want to query records from based on a timescale between two dates.
I have two variables,
DECLARE @StartDate datetime;
DECLARE @EndDate datetime;
What clause could I add to only show the records found within dates applied to these two variables?
This is based on a ‘Date’ column within the table.
Edited: Between clause is
inclusive(both dates are included in the result) so if you maybe want to exclude one of the dates in the variable columns better use: