--From PVD new table for conversion
-- Create table
create table I_MISCELLANEOUS
(
  PROCESSTYPE   NUMBER default 0 not null,
  PROCESS       VARCHAR2(255) not null,
  TABLENAME     VARCHAR2(30),
  STRINGVALUE1  VARCHAR2(40),
  STRINGVALUE2  VARCHAR2(40),
  STRINGVALUE3  VARCHAR2(40),
  STRINGVALUE4  VARCHAR2(40),
  STRINGVALUE5  VARCHAR2(40),
  STRINGVALUE6  VARCHAR2(255),
  STRINGVALUE7  VARCHAR2(255),
  STRINGVALUE8  VARCHAR2(255),
  STRINGVALUE9  VARCHAR2(255),
  STRINGVALUE10 VARCHAR2(255),
  NUMBERVALUE1  NUMBER,
  NUMBERVALUE2  NUMBER,
  NUMBERVALUE3  NUMBER,
  NUMBERVALUE4  NUMBER,
  NUMBERVALUE5  NUMBER,
  NUMBERVALUE6  NUMBER,
  NUMBERVALUE7  NUMBER,
  NUMBERVALUE8  NUMBER,
  NUMBERVALUE9  NUMBER,
  NUMBERVALUE10 NUMBER,
  DATEVALUE1    DATE,
  DATEVALUE2    DATE,
  DATEVALUE3    DATE,
  DATEVALUE4    DATE,
  DATEVALUE5    DATE,
  BOOLEANVALUE1 VARCHAR2(1) default 'N' not null,
  BOOLEANVALUE2 VARCHAR2(1) default 'N' not null,
  BOOLEANVALUE3 VARCHAR2(1) default 'N' not null,
  BOOLEANVALUE4 VARCHAR2(1) default 'N' not null,
  BOOLEANVALUE5 VARCHAR2(1) default 'N' not null
);
-- Add comments to the columns 
comment on column I_MISCELLANEOUS.PROCESSTYPE
  is '1 Process type that can have many records in this table';
comment on column I_MISCELLANEOUS.PROCESS
  is 'Description and or sql statement of the process type';
comment on column I_MISCELLANEOUS.TABLENAME
  is 'Optional description for the table that is to be used for update/insert/delete';
comment on column I_MISCELLANEOUS.BOOLEANVALUE1
  is 'Y, N';
comment on column I_MISCELLANEOUS.BOOLEANVALUE2
  is 'Y, N';
comment on column I_MISCELLANEOUS.BOOLEANVALUE3
  is 'Y, N';
comment on column I_MISCELLANEOUS.BOOLEANVALUE4
  is 'Y, N';
comment on column I_MISCELLANEOUS.BOOLEANVALUE5
  is 'Y, N';
-- Create/Recreate check constraints 
alter table I_MISCELLANEOUS
  add constraint CHK_I_MISCELLANEOUS_BOOLEAN1
  check (BOOLEANVALUE1 IN ('Y','N'));
alter table I_MISCELLANEOUS
  add constraint CHK_I_MISCELLANEOUS_BOOLEAN2
  check (BOOLEANVALUE2 IN ('Y','N'));
alter table I_MISCELLANEOUS
  add constraint CHK_I_MISCELLANEOUS_BOOLEAN3
  check (BOOLEANVALUE3 IN ('Y','N'));
alter table I_MISCELLANEOUS
  add constraint CHK_I_MISCELLANEOUS_BOOLEAN4
  check (BOOLEANVALUE4 IN ('Y','N'));
alter table I_MISCELLANEOUS
  add constraint CHK_I_MISCELLANEOUS_BOOLEAN5
  check (BOOLEANVALUE5 IN ('Y','N'));

-- Create/Recreate indexes 
create index INDX_I_MISCELLANEOUS on I_MISCELLANEOUS (processtype);