CREATE TABLE  "REPORT_ARCHIVE" 
   (	"ID" NUMBER, 
	"FILENAME" VARCHAR2(4000), 
	"REPORT" BLOB, 
	"MIMETYPE" VARCHAR2(255), 
	"CREATED_DATE" DATE, 
	"CREATED_BY" VARCHAR2(4000), 
	 CONSTRAINT "REPORT_ARCHIVE_PK" PRIMARY KEY ("ID") ENABLE
   );


create sequence "REPORT_ARCHIVE_SEQ"
start with 1
increment by 1
nocache
nocycle
noorder;   


CREATE OR REPLACE TRIGGER  "BI_REPORT_ARCHIVE" 
    before insert on report_archive        
    for each row  
begin   
    if :new.id is null then 
        select report_archive_seq.nextval into :new.id from dual; 
    end if; 
end; 


