I have the following question, I have a table that has items that have validity (date of beginning and end).
where I can select a period of dates x and want to see all items that are valid within this period or that its date or end date is within the period.
I am doing the WHERE as follows:
AND (V_DATA_INICIO BETWEEN DATAINICIAL and DATAFINAL
OR V_DATA_FIM BETWEEN DATAINICIAL AND DATAFINAL)
I would like your opinions if you have how to do this in a faster way or some kind of inidice that can be used for this case.
grateful for your attention.
Thanks.