Tag : oracle loop date

Written on Feb, 07, 2021 by in , , , , | Leave a comment

Oracle’da başlangıç ve bitiş tarihleri verip, bir loop yapmak istenirse CONNECT BY LEVEL yapısı kullanılabilir. By declaring start and end end you can make a loop with CONNECT BY LEVEL clause. DECLARE v_start DATE := TO_DATE(‘23.01.2021′,’DD.MM.YYYY’); v_end DATE := TO_DATE(‘03.02.2021′,’DD.MM.YYYY’); v_date DATE; CURSOR c_dates IS SELECT v_start+LEVEL-1 AS dates FROM sys.dual CONNECT BY LEVEL <= v_end-v_start+1; BEGIN OPEN c_dates; LOOP …

Continue Reading...