日期:2014-05-16 浏览次数:20435 次
DECLARE cnt int; begin --如果存在该临时表,则删除 SELECT count(1) into cnt from user_tables where table_name='TEMPLOGSMSHALL_SESSION'; if cnt>0 THEN BEGIN execute immediate 'DROP TABLE TEMPLOGSMSHALL_SESSION'; END; end if; end; / --创建临时表 CREATE GLOBAL TEMPORARY TABLE TempLogSmsHall_Session ( SESSIONID VARCHAR2(28) NOT NULL, USERTELNO VARCHAR2(16) NOT NULL, USERCITYNAME VARCHAR2(8) NOT NULL, USERBRANDNAME VARCHAR2(16) NOT NULL, NLIBIZNAME VARCHAR2(32) NOT NULL, BIZNAME VARCHAR2(128) NOT NULL, OPERATIONNAME VARCHAR2(16) NOT NULL, SCENEHANDLETYPE VARCHAR2(32) NOT NULL, SCENEHANDLEID VARCHAR2(6) NOT NULL, SESSIONBEGINTIME TIMESTAMP NOT NULL, SESSIONENDTIME TIMESTAMP NOT NULL, ISTIMEOUT CHAR(1) DEFAULT '1' NOT NULL, ALLCOSTSECONDS INTEGER DEFAULT (0) NOT NULL, REVSMSNUM INTEGER DEFAULT (0) NOT NULL, SENDSMSNUM INTEGER DEFAULT (0) NOT NULL ) ON COMMIT PRESERVE ROWS;
DECLARE job NUMBER; begin dbms_job.submit(job => job, what => 'ECSS_JOB.SMSS10_Job_DailyStatus('''');', next_date => trunc(sysdate) + ( 1 + 1/24), interval => 'sysdate + 1'); commit; end;