Adriano Espinoza de Oliveira escreveu:
Detalhe mais um pouco:Boa Tarde Rogério!!! Para o que você deseja existe o operador OVERLAPS. Consulte na própria documentação do PostgreSQL. "... In addition to these functions, the SQL OVERLAPS operator is supported: ( start1, end1) OVERLAPS (start2, end2)( start1, length1) OVERLAPS (start2, length2)
This _expression_ yields true when two time periods (defined by their endpoints) overlap, false when they do not overlap. The endpoints can be specified as pairs of dates, times, or time stamps; or as a date, time, or time stamp followed by an interval. SELECT (DATE '2001-02-16', DATE '2001-12-21') OVERLAPS (DATE '2001-10-30', DATE '2002-10-30'); Result: trueSELECT (DATE '2001-02-16', INTERVAL '100 days') OVERLAPS (DATE '2001-10-30', DATE '2002-10-30'); Result: false..."Abraço!!!! -- Luiz Henrique Livrari Implantador de Sistemas Jr. MSI SOLUÇÕES - Unidade Ourinhos Av. Dr. Altino Arantes, 131 Sala 145 - 146 Centro - Ourinhos/SP - Brasil Fone/Fax: +55 (14) 3324-8181 www.msisolucoes.com.br |
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
