Example: Add a column to a view

You can insert a SELECT clause to the RT_MD_VIEWDICTIONARY table to add an additional column. To add the column TEST_COL, which gets data from the RT_ACTIVATED_FORMS table, to the RD_MEDHIST view:

insert into RT_MD_VIEWDICTIONARY 
(VIEWNAME, COLUMNNAME, VIEWTYPE,LANGUAGEID, CLAUSE,COLUMNTYPE,SECTIONORDER, ITEMORDER,CHILDITEMORDER,COLUMNORDER,EXPRESSION)
values ('RD_MEDHIST',
'TEST_COL', -- a unique column name
'RD',       -- has to be RD view type
2, 
'SELECT',  -- has to be a SELECT clause
3,         -- string type
999,
25,       -- increase the max count by 1
25,       -- increase the max count by 1
160,      -- increase the max count by 1
'AF.REASON'  -- get the REASON column from the base table );
commit;