日期:2014-05-17 浏览次数:20951 次
/* Formatted on 2013/06/13 09:19 (Formatter Plus v4.8.8) */
DECLARE
num NUMBER;
BEGIN
SELECT COUNT (*)
INTO num
FROM glb_rpt_uph
WHERE start_time = TO_DATE ('2013-6-13 15:30:00', 'yyyy-MM-dd hh24:mi:ss');
IF num <> 0
THEN
UPDATE glb_rpt_uph
SET model = 'AK73-BTE-EA1',
shift = 'd',
end_time =
TO_DATE ('2013-6-13 16:30:00', 'yyyy-MM-dd hh24:mi:ss'),
input = 0,
output = 0,
fpy = 1,
uph = 107,
upph = 4
WHERE start_time =
TO_DATE ('2013-6-13 15:30:00', 'yyyy-MM-dd hh24:mi:ss');
ELSE
INSERT INTO glb_rpt_uph
VALUES ('AK73-BTE-EA1', 'd',
TO_DATE ('2013-6-13 15:30:00', 'yyyy-MM-dd hh24:mi:ss'),
TO_DATE ('2013-6-13 16:30:00', 'yyyy-MM-dd hh24:mi:ss'),
0, 0, 1, 107, 4);
END IF;
END;