Saturday, June 23, 2012

Noetix: Omitting View Templates (Script)

Similarly to a previous post to omit view columns from templates (see here) this script will allow you to omit whole view templates by calling a single file. Here is the script;

define noetix_view = &1;
define update_date = &2;

UPDATE N_View_Templates N
       n.last_update_date = TO_DATE('&update_date'),
       n.last_updated_by = 'A Pellew'
 WHERE n.view_label = '&noetix_view'


The script file (omit_view_template_xu2.sql - I've called it) takes two parameters the first if the view label to disable and the second is the date to set the Last_Update_Date to.

You can call this script from wnoetxu2.sql. For example;

@omit_view_template_xu2.sql INV_Transaction_Details 17-JUN-2012

The point of doing this was to make sure that, if the way a view is disabled changes, we only have to update a single file. Hope this helps!
Post a Comment