Avatar of NiceMan331
NiceMan331

asked on 

Find missed day & store

i previously asked this question
https://www.experts-exchange.com/questions/28229246/get-the-missed-day.html

it was works well to get the missed days for data of one store
now if i want to add store number to the result , like this


declare
cursor c_stores is 
select a.str_no
 from cr_store a
where a.opdate > '28-dec-13';

BEGIN
FOR i in c_stores
   LOOP
  
SELECT i,tc.DATE_TIME_START
FROM calendar_table tc
where tc.date_time_start between '01-jan-14' and sysdate
and tc.date_time_start
not IN
(select ds.dob from 
cr_gnditem ds
where ds.unit = i 
and ds.dob between '01-jan-14' and sysdate
group by ds.dob)
order by tc.DATE_TIME_START;
end loop;
end;

Open in new window


but it sent me error message that data wrong of type
Oracle Database

Avatar of undefined
Last Comment
NiceMan331

8/22/2022 - Mon