기간 중복체크
-
MySQL/예약기간 중복 찾기DBMS/MySql (MariaDB) 2022. 11. 7. 10:37
1-20분만 보면 될거라 생각해지만.. 장정 1시간 넘게 애먹인 놈... 젝1 중복되는 기간 찾기 WITH T_CONTRACT AS ( SELECT 1, '20221106' AS START_DATE, '20221107' AS END_DATE, 'NO' AS OK UNION ALL SELECT 1, '20221108' AS START_DATE, '20221109' AS END_DATE, 'NO' AS OK UNION ALL SELECT 1, '20221110' AS START_DATE, '20221111' AS END_DATE, 'NO' AS OK UNION ALL SELECT 1, '20221113' AS START_DATE, '20221114' AS END_DATE, 'OK' AS OK ) SELECT..