create table regx(
ID number(3) primary key,
condition char(8),
pattern varchar2(55));
insert into regx values(100, 'SPE00001', 'Error where item =%');
insert into regx values(200, 'SPE00001', 'Discard due to code =%on customer');
insert into regx values(300, 'SPE00001', 'Discard due to code =%on vendor =%');
insert into regx values(400, 'SPE00001', '%');
insert into regx values(500, 'SPE00002', 'Error where item =%');
insert into regx values(600, 'SPE00002', 'Discard due to reason =%on customer');
insert into regx values(700, 'SPE00002', 'Discard due to code =%on invoice =%');
insert into regx values(800, 'SPE00002', '%');
insert into regx values(900, 'SPE00003', '%');
create table tlog(
condition char(8),
msg varchar2(55));
insert into tlog values('SPE00001', 'Error where item = 1234');
insert into tlog values('SPE00001', 'Error where item = 2345');
insert into tlog values('SPE00001', 'Discard due to code = 123 on customer');
insert into tlog values('SPE00001', 'Discard due to code = 234 on customer');
insert into tlog values('SPE00001', 'Discard due to code = 345 on customer');
insert into tlog values('SPE00001', 'Discard due to code = 123 on vendor = 456');
insert into tlog values('SPE00001', 'Discard due to code = 234 on vendor = 567');
insert into tlog values('SPE00001', 'Discard due to code = 345 on vendor = 678');
insert into tlog values('SPE00001', 'Discard due to code = 456 on vendor = 789');
insert into tlog values('SPE00001', 'Other kind of message');
insert into tlog values('SPE00001', 'Another kind of message');
insert into tlog values('SPE00001', 'Yet, another');
insert into tlog values('SPE00002', 'Error where item = 1234');
insert into tlog values('SPE00002', 'Error where item = 2345');
insert into tlog values('SPE00002', 'Discard due to reason = 123 on customer');
insert into tlog values('SPE00002', 'Discard due to reason = 234 on customer');
insert into tlog values('SPE00002', 'Discard due to reason = 345 on customer');
insert into tlog values('SPE00002', 'Discard due to code = 123 on invoice = 456');
insert into tlog values('SPE00002', 'Discard due to code = 234 on invoice = 567');
insert into tlog values('SPE00002', 'Discard due to code = 345 on invoice = 678');
insert into tlog values('SPE00002', 'Discard due to code = 456 on invoice = 789');
insert into tlog values('SPE00002', 'Discard due to code = 456 on invoice = 789');
insert into tlog values('SPE00002', 'Discard due to code = 456 on invoice = 789');
insert into tlog values('SPE00002', 'Other kind of message');
insert into tlog values('SPE00002', 'Another kind of message');
insert into tlog values('SPE00002', 'Yet, another');
insert into tlog values('SPE00002', 'Yet, another');
insert into tlog values('SPE00002', 'Yet, another');
insert into tlog values('SPE00003', 'Error 1234');
insert into tlog values('SPE00003', 'Error 2345');
insert into tlog values('SPE00003', 'Reason = 123 on customer');
insert into tlog values('SPE00003', 'Reason = 234 on customer');
insert into tlog values('SPE00003', 'Other kind of message');
insert into tlog values('SPE00003', 'Another kind of message');
commit;