-1
I have the following query
:
SELECT raddb.FisioterapiaUtente.Id, DataConsulta, Inicio, Fim, raddb.UtentesCD.Utente, nome
FROM raddb.FisioterapiaUtente LEFT OUTER JOIN raddb.usuarios ON raddb.usuarios.id = raddb.FisioterapiaUtente.Fisioterapeuta
LEFT OUTER JOIN raddb.UtentesCD ON raddb.UtentesCD.IdUtente = raddb.FisioterapiaUtente.Utente WHERE DataConsulta BETWEEN '2019-10-26' AND '2019-11-25'
I intend to always research this period (between 26 and 25 of each month) over the year, so the problem is to define the dates dynamically.
Make a
WHERE
with a condition in the date column of your record. Here: read about theBETWEEN
.– Woss
@Woss Yes, I know that the problem is how I always define the 26th of the previous month automatically and the 25th of the current month automatically.
– Bruno
Um, then I could clarify that in the question. Can [Dit] and put an example of the condition you need to have, even with fixed dates and describe that the problem is only in setting the dates dynamically?
– Woss
@Woss edited the question as you suggested, so it is clear my problem. Thank you
– Bruno