Example: Add a where clause to a view
You can insert a new FROM clause to the RT_MD_VIEWDICTIONARY table to add an additional where clause to a view. To add the where clause CT.MHTERM12_ITMMEDHISTALLER != 'abc' to the RD_MEDHIST view:
insert into RT_MD_VIEWDICTIONARY
(VIEWNAME, COLUMNNAME, VIEWTYPE,LANGUAGEID, CLAUSE,
COLUMNTYPE,SECTIONORDER, ITEMORDER,CHILDITEMORDER,
COLUMNORDER,EXPRESSION)
values ('RD_MEDHIST',
'AND5', -- increase the existing count by 1 to create a unique
--column name
'RD', -- has to be RD view type
2,
'FROM', -- has to be a FROM clause
0,
0,
7, -- increase the max count by 1
0,
7, -- increase the max count by 1
' AND CT.MHTERM12_ITMMEDHISTALLER != ''abc''' -- leave space
--before AND. escape the single quote
);
commit;