sql>variable jobno number; sql>begin 2 sys.dbms_job.submit(:jobno, 'SP이름;', sysdate, 'TRUNC(SYSDATE) + 1', false); 3 End; 4 / sql>print jobno sql>exec dbms_job.run(21); sql>commit; 잡실행여부확인 sql>col what format a20 sql>select what, job, next_date, next_sec, failures, broken from user_jobs;잡강제실행 sql>exec dbms_job.run(21); 잡 Disable sql>exec dbms_job.broken(21, true); 잡 삭제 sql>exec dbms_job.remove(2..
WEB TIP
정해진 날짜의 모든 날짜 구하기 SELECT ROWNUM, TO_DATE('20060425', 'YYYYMMDD') + (ROWNUM-1) FROM DICTIONARY WHERE ROWNUM BETWEEN 1 AND 15 SELECT ROWNUM, TO_DATE('20060425','YYYY-MM-DD')+(LEVEL-1) AS R_DT FROM DUAL CONNECT BY LEVEL
SELECT X.RES_NO, (NM_1||'|'||NM_2||'|'||NM_3||'|'||NM_4||'|'||NM_5||'|'||NM_6||'|'||NM_7||'|'||NM_8||'|'||NM_9||'|'||NM_10) AS ALL_NM FROM ( SELECT RES_NO , MAX(CASE SEQ WHEN 1 THEN B.DELI_KR_NM END) NM_1 , MAX(CASE SEQ WHEN 2 THEN B.DELI_KR_NM END) NM_2 , MAX(CASE SEQ WHEN 3 THEN B.DELI_KR_NM END) NM_3 , MAX(CASE SEQ WHEN 4 THEN B.DELI_KR_NM END) NM_4 , MAX(CASE SEQ WHEN 5 THEN B.DELI_KR_NM END..
DECLARE i INTEGER; BEGIN FOR I IN 1..32 LOOP INSERT INTO 테이블명 (컬럼명) VALUES (컬럼값); END LOOP; END;
출처 : 오라클클럽CREATE SEQUENCE sequence_name [START WITH n] [INCREMENT BY n] [MAXVALUE n | NOMAXVALUE] [MINVALUE n | NOMINVALUE] [CYCLE | NOCYCLE]예문) CREATE SEQUENCE seq START WITH 1 INCREMENT BY 1 MAXVALUE 100 → 초기값 1, 증가값 1, 최대값 100