Hi, I have a problem with a query. I want to filter by date ranges with two columns. Start and End.
X | Inicio | Fin
1 |2018-10-01 | 2018-10-31
2 |2018-11-01 | 2018-11-30
3 |2018-11-15 | 2018-12-15
Inicio BETWEEN @parametroInicial AND @parametroFinal
AND
Fin BETWEEN @parametroInicial AND @parametroFinal
It has not worked for me. Simple filters like @parametroInicial < = Start either: (.
The data types of the columns and parameters are: DATETIME.
Example: in the table is the month of November, if I send the parameters' 2018-11-01 'to' 2018-11-30 'I should return the records 2 and 3 and in the same way if I send' 2018 -11-14 'to' 2018-11-16 '
The problem that I have seen is that in some filters it is limited to everything that is out of range or exclusively within the range therefore the records that its initial date is not inside, even if its final date is, they do not come out in the result.
link < - a reference image