2
I’m trying to ride a sql
to check if there is any record between times informed but not leaving, I did some tests but unsuccessfully.
For example, a bank record containing these two times, as initial and final respectively:
Horaini: 8:00 and Horafim: 8:30
Any period beginning or ending during that reporting period above must be selected/returned in sql
Periodos que devem retornar o registro citado a cima
7:45 até 8:15
8:00 até 8:15
But periods like these should return nothing:
Periodos sem retorno
7:45 até 8:00
8:30 até 8:45
It’s a logic problem, where I can’t hit the maior, menor e igual
to return what I need.
The bank is a MYSQL
the fields are TIME
and this select will run in a function Java
, that part is not the problem, but stays here to address the possible doubts.
I hope it was clear, I’ve looked at several examples and found nothing, if you look at the detail that the times are the same beginning and end, where the same time that ends one record starts another.
The type of the Horaini and Horafim columns is timestamp?
– Christian Luã Lemos
It was not clear no.
– user60252
Columns are Time type only
– P. Dominges