I’m using SQL2008 to create SPs. In my procedure I want to compare three date values and get the between two dates data from table.
I’m getting two dates from my UI @date1, @date2 and I have Date3 column in my table so based on the @date1, @date2 and Date3 I want to select some data from my table.
How can I do this?
I think that what you want is this:
This will get you all rows from the
Table where Date3 date is >= @date1 and <= @date2.