WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR  EXIT FAILURE ROLLBACK;

spool FND_CODING_RULE_ERROR_LOGS.log

prompt
prompt Creating table FND_CODING_RULE_ERROR_LOGS
prompt ============================
prompt
whenever sqlerror continue
drop table FND_CODING_RULE_ERROR_LOGS;
whenever sqlerror exit failure rollback

-- Create table
create table FND_CODING_RULE_ERROR_LOGS
( COMPANY_ID        NUMBER ,
	DOCUMENT_CATEGORY VARCHAR2(30) ,
	DOCUMENT_TYPE     VARCHAR2(30),
  OPERATION_UNIT_ID NUMBER,
  OPERATION_DATE    DATE,
  MESSAGE           VARCHAR2(1000),
  CREATED_BY        NUMBER not null,
  CREATION_DATE     DATE not null,
  LAST_UPDATED_BY   NUMBER not null,
  LAST_UPDATE_DATE  DATE not null
);
-- Create/Recreate indexes 
create index FND_CODING_RULE_ERROR_LOGS_N1 on FND_CODING_RULE_ERROR_LOGS ( COMPANY_ID, DOCUMENT_TYPE, OPERATION_UNIT_ID, DOCUMENT_CATEGORY);



spool off

exit
