DBA Data[Home] [Help]

APPS.GMP_CALENDAR_API SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 69

SELECT 1 FROM dual
WHERE EXISTS
(SELECT 1
FROM BOM_shift_dates sd, bom_shift_times sht
WHERE sd.calendar_code = sht.calendar_code
AND sd.shift_date = trunc(c_cal_date)
AND sd.shift_num = sht.shift_num
AND sd.calendar_code = c_calendar_id
AND sd.SEQ_NUM is NOT NULL
AND sht.to_time > sht.from_time);
Line: 81

SELECT COUNT(1)
FROM bom_Calendars
WHERE calendar_code =  p_calendar_code;
Line: 86

SELECT 	calendar_start_date,
 	calendar_end_date
FROM bom_calendars
WHERE calendar_code =  p_calendar_code;
Line: 235

SELECT sd.shift_date calendar_date,
	   sd.shift_num shift_num,
	   st.from_time from_time,
       	   decode(sign(st.to_time - st.from_time),1,(st.to_time - st.from_time),0,0,((86400 - st.from_time)+ st.from_time)) duration,
	   st.to_time to_time
FROM  bom_calendars cal,
	  bom_shift_dates sd,
	  bom_shift_times st
WHERE cal.calendar_code = c_calendar_code
AND sd.calendar_code = cal.calendar_code
AND st.calendar_code = sd.calendar_code
AND sd.shift_num = st.shift_num
AND sd.seq_num IS NOT NULL
AND (sd.shift_date + (st.from_time + decode(sign(st.to_time - st.from_time),1,(st.to_time - st.from_time),0,0,((86400 - st.from_time)+ st.from_time)))/86400) > c_start_date
ORDER BY sd.shift_date ,
	 st.from_time ,
	 st.to_time ;
Line: 255

SELECT sd.shift_date calendar_date,
	   sd.shift_num shift_num,
	   st.from_time from_time,
       	   decode(sign(st.to_time - st.from_time),1,(st.to_time - st.from_time),0,0,((86400 - st.from_time)+ st.from_time)) duration,
	   st.to_time to_time
FROM  bom_calendars cal,
	  bom_shift_dates sd,
	  bom_shift_times st
WHERE cal.calendar_code = c_calendar_code
AND sd.calendar_code = cal.calendar_code
AND st.calendar_code = sd.calendar_code
AND sd.shift_num = st.shift_num
AND sd.seq_num IS NOT NULL
AND (sd.shift_date + st.from_time/86400) < c_end_date
ORDER BY sd.shift_date DESC,
	 (st.from_time + decode(sign(st.to_time - st.from_time),1,(st.to_time - st.from_time),0,0,((86400 - st.from_time)+ st.from_time)))  DESC,
	 st.from_time DESC ;
Line: 440

            p_output_tbl.DELETE ;
Line: 533

            p_output_tbl.DELETE ;
Line: 599

SELECT COUNT(1)
FROM bom_Calendars
WHERE calendar_code =  c_calendar_code;
Line: 604

SELECT calendar_start_date ,
       calendar_end_date
FROM bom_Calendars
WHERE calendar_code =  c_calendar_code;
Line: 733

SELECT sd.shift_date calendar_date,
      decode(SUM(decode(sd.seq_num,NULL,0,1)),0,0,1) l_work_day
FROM  bom_calendars  cal,
      bom_shift_dates sd,
      bom_shift_times st
WHERE cal.calendar_code = c_calendar_code
AND sd.calendar_code = cal.calendar_code
AND st.calendar_code = sd.calendar_code
AND sd.shift_date BETWEEN trunc(c_start_date) AND trunc(c_end_date)
AND sd.shift_num = st.shift_num
GROUP BY sd.shift_date
ORDER BY sd.shift_date; /*B5182025 - sowsubra - added order by clause*/
Line: 871

SELECT sd.shift_date calendar_date,
	   SUM((st.to_time - st.from_time)/3600) duration
FROM bom_calendars cal,
	 bom_shift_dates sd,
	 bom_shift_times st
WHERE cal.calendar_code =  c_calendar_code
AND sd.calendar_code = cal.calendar_code
AND st.calendar_code = sd.calendar_code
AND sd.shift_date BETWEEN trunc(c_start_date) AND trunc(c_end_date)
AND sd.shift_num = st.shift_num
AND sd.seq_num IS NOT NULL
GROUP BY sd.shift_date
HAVING SUM((st.to_time - st.from_time)/3600) > 0 ;
Line: 986

SELECT shift_num,from_time,to_time
FROM bom_shift_times
WHERE calendar_code = c_calendar_code
AND shift_num = c_shopday_no
ORDER BY from_time ;
Line: 994

SELECT COUNT(*)
FROM bom_shift_times
WHERE calendar_code = c_calendar_code
AND shift_num = c_shopday_no;
Line: 1103

SELECT COUNT(1)
FROM bom_Calendars
WHERE calendar_code =  p_calendar_code;
Line: 1108

SELECT calendar_start_date ,
       calendar_end_date
FROM bom_Calendars
WHERE calendar_code =  p_calendar_code;
Line: 1197

SELECT COUNT(1)
FROM bom_Calendars
WHERE calendar_code =  c_calendar_code;
Line: 1320

  SELECT 1
  FROM  bom_calendars cal,
        bom_shift_dates sd,
        bom_shift_times st
  WHERE cal.calendar_code = c_calendar_code
  AND sd.calendar_code = cal.calendar_code
  AND st.calendar_code = sd.calendar_code
  AND sd.shift_num = st.shift_num
  -- B4610901, Rajesh Patangya 15-Sep-2005
  AND (sd.shift_date + (st.from_time/86400)) <= c_cal_date
  AND DECODE(
        SIGN(st.from_time - st.to_time),
	1,(sd.shift_date+1), sd.shift_date
	     ) + (st.to_time/86400) >=  c_cal_date
  AND sd.seq_num IS NOT NULL;
Line: 1490

SELECT 1
FROM sys.dual
WHERE EXISTS (
select 'x'
              FROM bom_calendars  bd,
                   bom_shift_dates sd,
                    bom_shift_times st
              WHERE bd.calendar_code = p_calendar_id
                 AND sd.calendar_code = bd.calendar_code
                AND sd.calendar_code= st.calendar_code
                AND sd.shift_num = st.shift_num
                AND (sd.shift_date + (st.from_time/86400))   <= p_date
				AND sd.seq_num IS NOT NULL
                AND ((decode(sign(st.from_time + (st.to_time- st.from_time) - 86400),1,
                     (sd.shift_date+1),sd.shift_date) ) +
                     (decode(sign(st.from_time + (st.to_time- st.from_time)  - 86400),1,
                     (st.from_time + (st.to_time- st.from_time)  - 86400),
                     (st.from_time + (st.to_time- st.from_time)))/86400 ) ) >= p_date);
Line: 1511

SELECT min (sd.shift_date + (st.from_time/86400))
FROM bom_calendars  bd,
     bom_shift_dates sd,
     bom_shift_times st
WHERE bd.calendar_code = p_calendar_id
  AND sd.calendar_code = bd.calendar_code
  AND sd.calendar_code= st.calendar_code
  AND sd.shift_num = st.shift_num
  AND sd.seq_num IS NOT NULL
  AND (st.to_time- st.from_time)  > 0
  AND (sd.shift_date + (st.from_time/86400))   > p_cal_date ;
Line: 1525

 SELECT max (
((decode(sign(st.from_time + (st.to_time- st.from_time)  - 86400),1,
    (sd.shift_date+1),sd.shift_date) ) +
    (decode(sign(st.from_time + (st.to_time- st.from_time)  - 86400),1,(st.from_time
    + (st.to_time- st.from_time)  - 86400),(st.from_time + (st.to_time- st.from_time)))/86400 )  )
)
FROM bom_calendars  bd,
     bom_shift_dates sd,
     bom_shift_times st
WHERE bd.calendar_code = p_calendar_id
  AND sd.calendar_code = bd.calendar_code
  AND sd.calendar_code= st.calendar_code
  AND sd.shift_num = st.shift_num
  AND sd.seq_num IS NOT NULL
  AND (st.to_time- st.from_time)  > 0
  AND ((decode(sign(st.from_time + (st.to_time- st.from_time)  - 86400),1,
    (sd.shift_date+1),sd.shift_date) ) +
    (decode(sign(st.from_time + (st.to_time- st.from_time)  - 86400),1,(st.from_time
    + (st.to_time- st.from_time)  - 86400),(st.from_time + (st.to_time- st.from_time)))/86400 ))
< p_date;