insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (16,       1015,10);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (17,       1046, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (17,       1022, 1, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (17, 1073741836, 2, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741835, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741944, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741837, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741907, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741829, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073741830, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17, 1073742265, 9);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17,       1034,10);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (17,       1015,11);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (18,       1046, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (18,       1022, 1, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (18,       1034, 2, 0, 135);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (18,       1015, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (18, 1073741863, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (18, 1073741864, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (18, 1610612757, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (18, 1610612758, 7);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (19,       1046, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (19,       1022, 1, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (19,       1045, 2, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19, 1073741825, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19, 1073741827, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19, 1073741826, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19,       1028, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19,       1002, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19,       1034, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (19,       1015, 9);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (21,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (21,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (21,       2173, 2, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (21,       2122, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (21,       2050, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (21,       2000, 5);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (22,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (22,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (22,       2039, 2, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (22,       2173, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (22,       2122, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (22,       2050, 5);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (23,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (23,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (23,       2122, 2, 0, 135);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2050, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2005, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2002, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2010, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2009, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2000, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2001, 9);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (23,       2006,10);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (24,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (24,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (24,       2015, 2, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2008, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2017, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2001, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2114, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2122, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (24,       2050, 8);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (25,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (25,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (25,       2013, 2, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2012, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2007, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2134, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2028, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2015, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2008, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2172, 9);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2122,10);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (25,       2050,11);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (26,       2136, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (26,       2119, 1, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (26,       2173, 2, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2011, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2175, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2006, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2117, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2000, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2122, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (26,       2050, 9);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3087, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3092, 1, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3083, 2, 0, 100);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3091, 3, 0, 65);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3130, 4, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3139, 5, 0, 95);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3128, 6, 0, 100);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3017, 7, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3187, 8, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3140, 9, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (31,       3052,10, 0, 120);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3087, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3092, 1, 0, 130);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3017, 2, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3010, 3, 0, 95);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3019, 4, 0, 95);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3002, 5, 0, 80);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3134, 6, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3140, 7, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (32,       3052, 8, 0, 120);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3087, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3092, 1, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3000, 2, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3187, 3, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3129, 4, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3011, 5, 0, 105);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3188, 6, 0, 100);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3005, 7, 0, 85);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3137, 8, 0, 110);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3140, 9, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (33,       3052,10, 0, 120);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3087, 0, 0, 40);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3092, 1, 0, 130);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3013, 2, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3012, 3, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3006, 4, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3151, 5, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3030, 6, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3017, 7, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3010, 8, 0, 95);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3186, 9, 0, 50);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3140,10, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (34,       3052,11, 0, 120);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (41,       1022, 0, 0, 200);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (41,       2176, 1, 0, 65);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (41,       1051, 2, 0, 135);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2173, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2117, 4);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2122, 5);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2050, 6);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2000, 7);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       1049, 8);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       1050, 9);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (41,       2177,10);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       3184, 0, 0, 75);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       3092, 1, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       3183, 2, 0, 70);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       3090, 3, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       3091, 4, 0, 65);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       6002, 5, 0, 90);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       6003, 6, 0, 100);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       6004, 7, 0, 95);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,  205521540, 8, 0, 100);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (51,       6006, 9, 0, 50);

insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       1022, 0, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2173, 1, 0, 45);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2000, 2, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (99,       2006, 3);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2117, 4, 0, 110);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2122, 5, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2050, 6, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       2176, 7, 0, 120);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       1051, 8, 0, 150);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER,WVIEW_FIELD_AUTOSIZE,WVIEW_FIELD_WIDTH) values (99,       1050, 9, 0, 130);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (99,       4006, 10);
insert into MSP_WEB_VIEW_REPORTS_FIELDS (WVIEW_ID,WFIELD_ID,WVIEW_FIELD_ORDER) values (99,       4008, 11);


if not exists (select * from MSP_WEB_ADMIN)
  insert into MSP_WEB_ADMIN (WADMIN_NPE_NEXT_RUN,WADMIN_AUTHENTICATION_TYPE,WADMIN_NEW_ACCOUNT_PRIVILEGE,WADMIN_IS_DELEGATION_ALLOWED,WADMIN_WEEK_STARTS_ON,WADMIN_MIN_PASSWORD_LENGTH,WADMIN_NTFY_FROM_EMAIL,WADMIN_NTFY_EMAIL_TRAILER,WADMIN_ORG_EMAIL_ADDRESS,WADMIN_DEFAULT_LANGUAGE,WADMIN_TIMESHEET_SPAN,WADMIN_WEEKLY_TIMESHEET_NUM_WEEKS,WADMIN_MONTHLY_REPORTS_PER_MONTH,WADMIN_MONTHLY_1PRD_1ST_START,WADMIN_MONTHLY_2PRDS_1ST_START,WADMIN_MONTHLY_2PRDS_1ST_END,WADMIN_MONTHLY_3PRDS_1ST_START,WADMIN_MONTHLY_3PRDS_1ST_END,WADMIN_MONTHLY_3PRDS_2ND_END,WADMIN_MAX_HOUR_PER_DAY,WADMIN_LOOKAHEAD,WADMIN_TIMEPERIOD_GRANULARITY,WADMIN_TRANS_HISTORY_DAYS,WADMIN_STS_TEMPLATE_LCID,WADMIN_STS_TEMPLATE_ID,WADMIN_VERSION_MAJOR,WADMIN_VERSION_MINOR,WADMIN_VERSION_BUILD,WADMIN_VERSION_REVISION) values ('1/1/1942',3,3,1,0,8,N'',N'Microsoft Office Project Server',N'',3082,1,2,2,1,1,15,1,10,20,10,10,2,60,3082,N'PWA',11,0,20030816,15);

if not exists (select * from MSP_WEB_RESERVED_DATA)
  insert into MSP_WEB_RESERVED_DATA (RESERVED_DATA1, RESERVED_DATA2, RESERVED_DATA3,RESERVED_DATA4) values (8964,193,2,-1);

delete from MSP_WEB_VIEW_REPORTS where WVIEW_ID < 100;
SET IDENTITY_INSERT MSP_WEB_VIEW_REPORTS ON;
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (1, N'Resumen',        N'Muestra información básica del proyecto',     1,1,0,6,0,2,newID(), 430);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (2, N'Seguimiento',       N'Muestra fechas confrontadas de programación y línea de base',   1,1,0,7,0,2,newID(), 500);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (3, N'Costo',           N'Muestra información de costos',              1,1,0,7,0,2,newID(), 350);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (4, N'Valor acumulado',   N'Muestra información de valor acumulado',      1,1,0,7,0,2,newID(), 330);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (5, N'Trabajo',           N'Muestra información de trabajo',              1,1,0,7,0,2,newID(), 370);

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (11,N'Resumen de tareas',           N'Muestra información básica de las tareas',        0,1,0,8,1,2,newID(), 285);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WVIEW_FILTER_PARAM1,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (12,N'Nivel superior de tareas',N'Muestra información de tareas de nivel superior',    0,1,0,8,1, ' where TaskOutlineLevel <= 1',2,newID(), 285);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (13,N'Detalles de tareas',            N'Muestra tiempo de demora y posposición',       0,1,0,9,1,2,newID(), 285);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (14,N'Redistribución de tareas',          N'Muestra los cambios realizados por la redistribución',      0,1,0,10,1,2,newID(), 285);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (15,N'Seguimiento de tareas',          N'Muestra fechas confrontadas de programación y línea de base',   0,1,0,11,1,2,newID(), 355);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (16,N'Costo de tarea',              N'Muestra información de costos',              0,1,0,8,1,2,newID(), 295);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (17,N'Valor acumulado de tareas',      N'Muestra información de valor acumulado',      0,1,0,8,1,2,newID(), 270);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (18,N'Programación de tareas',          N'Muestra información de programación',        0,1,0,9,1,2,newID(), 355);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (19,N'Trabajo de tareas',              N'Muestra información de trabajo',              0,1,0,8,1,2,newID(), 265);

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (21,N'Resumen de asignaciones',     N'Muestra información básica de asignaciones',  0,1,0,8,2,1,newID(), 330);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (22,N'Detalles de asignaciones',      N'Muestra tiempo de demora y posposición',       0,1,0,9,2,2,newID(), 335);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (23,N'Seguimiento de asignaciones',    N'Muestra fechas confrontadas de programación y línea de base',   0,1,0,11,2,2,newID(), 420);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (24,N'Costo de asignaciones',        N'Muestra información de costos',              0,1,0,8,2,2,newID(), 330);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (25,N'Valor acumulado de asignaciones',N'Muestra información de valor acumulado',      0,1,0,8,2,2,newID(), 335);
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (26,N'Trabajo de las asignaciones',        N'Muestra información de trabajo',              0,1,0,8,2,2,newID(), 330);

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (31,N'Resumen de recursos',       N'Muestra información básica de recursos',    0,0,0,1,3,2,newID());
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (32,N'Costo de recursos',          N'Muestra información de costos',              0,0,0,1,3,2,newID());
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (33,N'Trabajo de los recursos',          N'Muestra información de trabajo',              0,0,0,1,3,2,newID());
insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (34,N'Valor acumulado de los recursos',  N'Muestra información de valor acumulado',      0,0,0,1,3,2,newID());

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP,WVIEW_SPLITTER_POS) values (41,N'Resumen',                 N'Muestra información básica de los partes de horas',   2,2,0,1,0,2,newID(), 430);

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (51,N'Resumen de recursos',       N'Muestra información básica de recursos',    3,0,0,1,3,2,newID());

insert into MSP_WEB_VIEW_REPORTS (WVIEW_ID,WVIEW_NAME,WVIEW_DESCRIPTION,WVIEW_TYPE,WVIEW_DISPLAY_TYPE,WVIEW_REPORT_KIND,WGANTT_SCHEME_ID,WTABLE_ID,WGROUP_SCHEME_ID,WVIEW_TIMESTAMP) values (99,N'Parte de horas',       N'Muestra información básica de los partes de horas',   5,2,0,1,0,2,newID());

SET IDENTITY_INSERT MSP_WEB_VIEW_REPORTS OFF;

if not exists (select * from MSP_WEB_RESOURCES where WRES_ID=1)
begin
  SET IDENTITY_INSERT MSP_WEB_RESOURCES ON;
  insert into MSP_WEB_RESOURCES (WRES_ID,RES_NAME,WRES_IS_MANAGER,WRES_IS_ADMIN,WRES_CAN_LOGIN,WRES_COUNT_LICENSE,RESERVED_DATA1,RESERVED_DATA2,RESERVED_DATA3,RESERVED_DATA4) values (1,N'Administrador',1,1,1,1,0,0,CONVERT(int, RAND(DATEPART(ms, GETDATE())) * 1000000000),CONVERT(int, RAND(DATEPART(ms, GETDATE()) * 2) * 1000000000));
  SET IDENTITY_INSERT MSP_WEB_RESOURCES OFF;
end

delete from MSP_WEB_PROJECTS where WPROJ_ID=1;
SET IDENTITY_INSERT MSP_WEB_PROJECTS ON;
insert into MSP_WEB_PROJECTS (WPROJ_ID,PROJ_NAME,WPROJ_DELEG_ALLOWED,WPROJ_IS_NONWORKING) values (1,N'Período no dedicado a un proyecto',0,1);
SET IDENTITY_INSERT MSP_WEB_PROJECTS OFF;




delete from MSP_WEB_NOTIFICATION_EVENTS

SET IDENTITY_INSERT MSP_WEB_NOTIFICATION_EVENTS ON;
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1001, 1, 201, 1, 501, 601,  1, 401, 304, N'Self: when I receive a new task assignment.',                         N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1002, 1, 201, 0, 502, 602,  1, 407, 304, N'Self: when my manager requests a task update.',                       N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1003, 1, 201, 1, 503, 603,  1, 408, 304, N'Self: when my tasks are modified by the project manager.',            N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1004, 1,   0, 1, 537, 637,  0,   0, 307, N'Self: when a new issue is assigned to me.',                           NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1005, 1, 602, 1, 505, 605,  3, 402, 305, N'Self: when I receive a new status report request.',                   N'select WREPORT_NAME,RES_NAME from MSP_WEB_STATUS_REPORTS rp, MSP_WEB_RESOURCES rs where rp.WSR_ID in (^0) and rp.WRES_ID_MGR=rs.WRES_ID')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1006, 1,   0, 0, 506, 606,  5, 401, 304, N'Self: when I become a new lead.',                                     N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK, r.RES_NAME, r2.RES_NAME as TLeadName from (MSP_WEB_ASSIGNMENTS a INNER JOIN MSP_WEB_RESOURCES r ON a.WRES_ID=r.WRES_ID) LEFT JOIN MSP_WEB_RESOURCES r2 ON a.WRES_ID_TEAM_LEAD=r2.WRES_ID where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1026, 1,   0, 0, 527, 627,  1, 409, 304, N'Self: when a task is deleted in Project.',                            N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1027, 1,   0, 0, 506, 626,  5, 410, 304, N'Self: when my delegated tasks has a new lead',                        N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK, r.RES_NAME, r2.RES_NAME as TLeadName from (MSP_WEB_ASSIGNMENTS a INNER JOIN MSP_WEB_RESOURCES r ON a.WRES_ID=r.WRES_ID) LEFT JOIN MSP_WEB_RESOURCES r2 ON a.WRES_ID_TEAM_LEAD=r2.WRES_ID where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1030, 0, 201, 1, 530, 630,  9,   0, 304, N'Self: when I receive a new to-do list task assignment.',              N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1031, 0,   0, 1, 531, 631,  9,   0, 304, N'Self: when my to-do list tasks are updated.',                         N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1032, 1,   0, 0, 532, 632,  9,   0, 304, N'Self: when a task in my to-do list has been deleted.',                N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1033, 1, 301, 0, 533, 633,  0,   0, 304, N'Self: when I am assigned ownership of a to-do list.',                 NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1034, 1,   0, 1, 534, 634,  0,   0, 307, N'Self: when my issues are updated.',                                   NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1035, 0,   0, 1, 535, 635,  0,   0, 307, N'Self: when a new issue is created.',                                  NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1036, 0,   0, 1, 536, 636,  0,   0, 307, N'Self: when an issue is updated.',                                     NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1038, 0,   0, 1, 538, 638,  0,   0, 308, N'Self: when a new document is created.',                               NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1039, 0,   0, 1, 539, 639,  0,   0, 308, N'Self: when a document is updated.',                                   NULL)
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1040, 0,   0, 1, 540, 640,  0,   0, 308, N'Self: when a document is deleted,',                                   NULL)

insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1007, 1, 401, 1, 507, 607,  4, 412, 304, N'Mgr: when my resources submit new tasks.',                            N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1008, 1, 401, 1, 508, 608,  2, 405, 304, N'Mgr: when my resources delegate their tasks.',                        N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK, RES_NAME from MSP_WEB_ASSIGNMENTS a, MSP_WEB_RESOURCES r where WASSN_ID in (^0) and a.WRES_ID=r.WRES_ID order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1009, 1, 401, 1, 509, 609,  4, 413, 304, N'Mgr: when my resources update their tasks.',                          N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1010, 1, 402, 1, 510, 610,  6, 406, 306, N'Mgr: when my resources submit working and nonworking time changes.',  N'select WNONWORK_SUBJECT,WNONWORK_START,WNONWORK_END from MSP_WEB_NONWORKING where WNONWORK_ID in (^0)')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1011, 1, 604, 1, 511, 611,  7, 404, 305, N'Mgr: when my resources submit their status reports.',                 N'select rs.WSRESP_PERIOD_START,rs.WSRESP_PERIOD_FINISH, CASE rp.WREPORT_UNREQUESTED WHEN 1 THEN N''No solicitado'' ELSE N''Solicitado'' END AS WSRESP_TYPE from MSP_WEB_STATUS_RESPONSES rs inner join MSP_WEB_STATUS_REPORTS rp on rs.WSR_ID = rp.WSR_ID where WRESP_ID=^0')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1016, 1,   0, 0, 516, 616,  4, 411, 304, N'Mgr: when my resource rejects their assignments',                     N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1025, 1,   0, 0, 506, 625,  5, 403, 304, N'Mgr: when a new delegation lead has been appointed',                  N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK, r.RES_NAME, r2.RES_NAME as TLeadName from (MSP_WEB_ASSIGNMENTS a INNER JOIN MSP_WEB_RESOURCES r ON a.WRES_ID=r.WRES_ID) LEFT JOIN MSP_WEB_RESOURCES r2 ON a.WRES_ID_TEAM_LEAD=r2.WRES_ID where WASSN_ID in (^0) order by ASSN_START_DATE')
  
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1017, 1,   0, 0, 517, 617,  1, 401, 304, N'Rejected task updates by manager',                                    N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1018, 1,   0, 0, 518, 618,  1, 401, 304, N'Rejected new tasks by manager',                                       N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1019, 1,   0, 0, 519, 619,  1, 401, 304, N'Rejected task updates by timesheet approver',                         N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1020, 1,   0, 0, 520, 620,  1, 401, 304, N'Rejected task delegation requests by manager to delegator',           N'select TASK_NAME,ASSN_START_DATE,ASSN_FINISH_DATE,ASSN_WORK,ASSN_REM_WORK,RES_NAME as TDelegateeName from MSP_WEB_ASSIGNMENTS,MSP_WEB_DELEGATIONS,MSP_WEB_RESOURCES where MSP_WEB_ASSIGNMENTS.WASSN_LAST_DELEG_ID=MSP_WEB_DELEGATIONS.WDELEG_ID and MSP_WEB_DELEGATIONS.WRES_ID_DELEGATEE=MSP_WEB_RESOURCES.WRES_ID and WASSN_ID in (^0)')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1021, 1,   0, 0, 521, 621,  1, 401, 304, N'Rejected task delegation requests by manager to delegatee',           N'select TASK_NAME,ASSN_START_DATE,ASSN_FINISH_DATE,ASSN_WORK,ASSN_REM_WORK,RES_NAME as TDelegatorName from MSP_WEB_ASSIGNMENTS,MSP_WEB_DELEGATIONS,MSP_WEB_RESOURCES where MSP_WEB_ASSIGNMENTS.WASSN_LAST_DELEG_ID=MSP_WEB_DELEGATIONS.WDELEG_ID and MSP_WEB_DELEGATIONS.WRES_ID_DELEGATOR=MSP_WEB_RESOURCES.WRES_ID and WASSN_ID in (^0)')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1022, 1,   0, 0, 522, 622,  1, 401, 304, N'Rejected task delegation requests by resource to delegator',          N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK, RES_NAME from MSP_WEB_ASSIGNMENTS a, MSP_WEB_RESOURCES r where WASSN_ID in (^0) and a.WRES_ID=r.WRES_ID order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1023, 1,   0, 0, 523, 623,  1, 414, 304, N'Rejected task delegation requests by resource to manager',            N'select TASK_NAME,ASSN_START_DATE,ASSN_FINISH_DATE,ASSN_WORK,ASSN_REM_WORK,RES_NAME as TDelegatorName from MSP_WEB_ASSIGNMENTS,MSP_WEB_DELEGATIONS,MSP_WEB_RESOURCES where MSP_WEB_ASSIGNMENTS.WASSN_LAST_DELEG_ID=MSP_WEB_DELEGATIONS.WDELEG_ID and MSP_WEB_DELEGATIONS.WRES_ID_DELEGATOR=MSP_WEB_RESOURCES.WRES_ID and WASSN_ID in (^0)')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1024, 1,   0, 0, 524, 624,  1, 401, 304, N'Rejected tasks declines by manager',                                  N'select TASK_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS where WASSN_ID in (^0) order by ASSN_START_DATE')
insert into MSP_WEB_NOTIFICATION_EVENTS (WNTFY_EVENT_ID, WNTFY_EVENT_DEFAULT, WNTFY_EVENT_ACTION_ID, WNTFY_EVENT_SHOW_UI, WNTFY_EMAIL_SUBJECT, WNTFY_EMAIL_TITLE, WNTFY_EMAIL_CONTENT, WNTFY_EMAIL_TAIL1, WNTFY_EMAIL_TAIL2, WNTFY_EVENT_DESC, WNTFY_EVENT_QUERY) values (1028, 1,   0, 0, 528, 628,  0, 402, 305, N'Removed from status report request',                                  NULL)
  
SET IDENTITY_INSERT MSP_WEB_NOTIFICATION_EVENTS OFF;
   




delete from MSP_WEB_REMINDER_TYPES

insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11001,   2, 1, 901, 401, N'TSR_001: Remind me [x] [days] before my tasks start',                                        N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_START_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11002,   2, 1, 902, 401, N'TSR_002: Remind me [x] [days] beofre my tasks are due',                                      N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11003,   2, 1, 903, 401, N'TSR_003:   Then remind me [every] [day] until my tasks are complete',                        N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11004,   2, 1, 904, 401, N'TSR_004: Remind me [every] [day] of my incomplete tasks',                                    N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11005,   2, 1, 905, 401, N'TSR_005: Remind me when tasks are [x] [days] overdue',                                       N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (11006,   2, 1, 906, 401, N'TSR_006:   Then remind me [every] [day] until my tasks are complete',                        N'select A.WPROJ_ID, A.TASK_NAME, A.ASSN_START_DATE, A.ASSN_FINISH_DATE, A.ASSN_WORK, A.ASSN_REM_WORK from MSP_WEB_ASSIGNMENTS A, MSP_WEB_PROJECTS P where A.WRES_ID=^0 and (^1) and A.WPROJ_ID=P.WPROJ_ID and P.WPROJ_IS_NONWORKING=0 and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and A.WASSN_REMOVED_BY_RESOURCE=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (12001,   4, 1, 907, 402, N'SSR_001: Remind me when my status reports are due in [x] [days]',                            N'select RE.WSR_ID, RP.WREPORT_NAME, R.RES_NAME as WDUE_TO, WDUE_ON from MSP_WEB_STATUS_REQUESTS RE, MSP_WEB_STATUS_REPORTS RP, MSP_WEB_RESOURCES R where WREQ_IS_ENABLED<>0 and WREQ_IS_SENT<>0 and WREPORT_IS_ENABLED<>0 and WRES_ID_RECEIVER=^0 and (^1) and RE.WSR_ID = RP.WSR_ID and RP.WRES_ID_MGR=R.WRES_ID order by RE.WSR_ID, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (12002,   4, 1, 908, 402, N'SSR_002: Remind me when my status reports are [x] [days] overdue',                           N'select RE.WSR_ID, RP.WREPORT_NAME, R.RES_NAME as WDUE_TO, WDUE_ON from MSP_WEB_STATUS_REQUESTS RE, MSP_WEB_STATUS_REPORTS RP, MSP_WEB_RESOURCES R where WREQ_IS_ENABLED<>0 and WREQ_IS_SENT<>0 and WREPORT_IS_ENABLED<>0 and WRES_ID_RECEIVER=^0 and (^1) and RE.WSR_ID = RP.WSR_ID and RP.WRES_ID_MGR=R.WRES_ID order by RE.WSR_ID, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (12003,   4, 1, 909, 402, N'SSR_003:   Then remind me [every] [day] until my status reports have been submitted',        N'select RS.WSR_ID, RP.WREPORT_NAME, R.RES_NAME as WDUE_TO, WSRESP_PERIOD_FINISH as WDUE_ON from MSP_WEB_STATUS_RESPONSES RS, MSP_WEB_STATUS_REPORTS RP, MSP_WEB_RESOURCES R where RS.WRES_ID=^0 and (^1) and RS.WSR_ID=RP.WSR_ID and RP.WRES_ID_MGR=R.WRES_ID order by RS.WSR_ID, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (12004,   4, 1, 910, 402, N'SSR_004: Remind me [every] [day] until my status reports have been submitted',               N'select RS.WSR_ID, RP.WREPORT_NAME, R.RES_NAME as WDUE_TO, WSRESP_PERIOD_FINISH as WDUE_ON from MSP_WEB_STATUS_RESPONSES RS, MSP_WEB_STATUS_REPORTS RP, MSP_WEB_RESOURCES R where RS.WRES_ID=^0 and (^1) and RS.WSR_ID=RP.WSR_ID and RP.WRES_ID_MGR=R.WRES_ID order by RS.WSR_ID, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (21001,   2, 0, 917, 403, N'TMR_001: Remind them [x] [days] before their tasks are due',                                 N'select A.WPROJ_ID, A.WRES_ID, TASK_ID, TASK_NAME, RES_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK  from MSP_WEB_ASSIGNMENTS A, MSP_WEB_RESOURCES R, MSP_WEB_PROJECTS P where A.WPROJ_ID=P.WPROJ_ID and WRES_ID_MGR=^0 and (^1) and A.WRES_ID=R.WRES_ID and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.WRES_ID, ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (21002,   2, 0, 918, 403, N'TMR_002: Remind them when their tasks are [x] [days] overdue',                               N'select A.WPROJ_ID, A.WRES_ID, TASK_ID, TASK_NAME, RES_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK  from MSP_WEB_ASSIGNMENTS A, MSP_WEB_RESOURCES R, MSP_WEB_PROJECTS P where A.WPROJ_ID=P.WPROJ_ID and WRES_ID_MGR=^0 and (^1) and A.WRES_ID=R.WRES_ID and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.WRES_ID, ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (21003,   2, 0, 919, 403, N'TMR_003:   Then remind them [every] [day] until their tasks are complete.',                  N'select A.WPROJ_ID, A.WRES_ID, TASK_ID, TASK_NAME, RES_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK  from MSP_WEB_ASSIGNMENTS A, MSP_WEB_RESOURCES R, MSP_WEB_PROJECTS P where A.WPROJ_ID=P.WPROJ_ID and WRES_ID_MGR=^0 and (^1) and A.WRES_ID=R.WRES_ID and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.WRES_ID, ASSN_FINISH_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (21004,   2, 0, 920, 403, N'TMR_004: Remind them when their tasks have started for [x] [days] but have no actual work.', N'select A.WPROJ_ID, A.WRES_ID, TASK_ID, TASK_NAME, RES_NAME, ASSN_START_DATE, ASSN_FINISH_DATE, ASSN_WORK, ASSN_REM_WORK  from MSP_WEB_ASSIGNMENTS A, MSP_WEB_RESOURCES R, MSP_WEB_PROJECTS P where A.WPROJ_ID=P.WPROJ_ID and WRES_ID_MGR=^0 and (^1) and A.WRES_ID=R.WRES_ID and A.ASSN_BOOKING_TYPE=0 and A.WASSN_DELETED_IN_PROJ=0 and P.WPROJ_ADMINPROJECT=0 order by A.WPROJ_ID, A.WRES_ID, ASSN_START_DATE')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (22001,   4, 0, 921, 404, N'SMR_001: Remind them when their status reports are due in [x] [days].',                      N'select RE.WSR_ID, R1.RES_NAME as WDUE_TO, R2.RES_NAME, WDUE_ON from MSP_WEB_STATUS_REQUESTS RE, MSP_WEB_STATUS_REPORTS SR, MSP_WEB_RESOURCES R1, MSP_WEB_RESOURCES R2 where WREQ_IS_ENABLED<>0 and WREQ_IS_SENT<>0 and WREPORT_IS_ENABLED<>0 and WRES_ID_RECEIVER=^0 and (^1) and RE.WSR_ID=SR.WSR_ID and WRES_ID_MGR=R1.WRES_ID and WRES_ID_RECEIVER=R2.WRES_ID order by RE.WSR_ID, WRES_ID_RECEIVER, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (22002,   4, 0, 922, 404, N'SMR_002: Remind them when their status reports are [x] [days] overdue.',                     N'select RE.WSR_ID, R1.RES_NAME as WDUE_TO, R2.RES_NAME, WDUE_ON from MSP_WEB_STATUS_REQUESTS RE, MSP_WEB_STATUS_REPORTS SR, MSP_WEB_RESOURCES R1, MSP_WEB_RESOURCES R2 where WREQ_IS_ENABLED<>0 and WREQ_IS_SENT<>0 and WREPORT_IS_ENABLED<>0 and WRES_ID_RECEIVER=^0 and (^1) and RE.WSR_ID=SR.WSR_ID and WRES_ID_MGR=R1.WRES_ID and WRES_ID_RECEIVER=R2.WRES_ID order by RE.WSR_ID, WRES_ID_RECEIVER, WDUE_ON')
insert into MSP_WEB_REMINDER_TYPES (WRMND_TYPE_ID, WRMND_TABLE_ID, WRMND_IS_SELF, WRMND_EMAIL_TITLE, WRMND_EMAIL_TAIL1, WRMND_TYPE_DESC, WRMND_QUERY) values (22003,   4, 0, 923, 404, N'SMR_003:   Then remind them [every] [day] until the status reports are submitted',           N'select RS.WSR_ID, R1.RES_NAME as WDUE_TO, R2.RES_NAME, WSRESP_PERIOD_FINISH as WDUE_ON from MSP_WEB_STATUS_RESPONSES RS, MSP_WEB_STATUS_REPORTS SR, MSP_WEB_RESOURCES R1, MSP_WEB_RESOURCES R2  where WREPORT_IS_ENABLED<>0 and RS.WRES_ID=^0 and (^1) and RS.WSR_ID=SR.WSR_ID and WRES_ID_MGR=R1.WRES_ID and RS.WRES_ID=R2.WRES_ID order by RS.WSR_ID, RS.WRES_ID, WDUE_ON')





delete from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID <= 10000

set IDENTITY_INSERT MSP_WEB_SECURITY_FEATURES_ACTIONS ON


insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 100,    0, 0, 0, 90100)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 101,  100, 1, 0, 90101)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 102,  100, 1, 0, 90102)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 103,  100, 1, 0, 90103)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 104,  100, 1, 0, 90104)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 105,  100, 1, 0, 90105)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 106,  100, 1, 0, 90106)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 107,  100, 1, 0, 90107)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 108,  100, 1, 0, 90108)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 150,  100, 1, 0, 90150)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 151,  100, 1, 0, 90151)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 152,  100, 1, 0, 90152)


insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 200,    0, 0, 0, 90200)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 201,  200, 1, 0, 90201)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 202,  200, 1, 0, 90202)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 203,  200, 1, 0, 90203)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 204,  200, 1, 0, 90204)
--insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 205,  200, 1, 0, 90205)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 206,  200, 1, 0, 90206)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 207,  200, 1, 0, 90207)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 210,  200, 1, 0, 90210)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 211,  200, 1, 0, 90211)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 212,  200, 1, 1, 90212)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 213,  200, 1, 1, 90213)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 300,    0, 0, 0, 90300)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 301,  300, 1, 0, 90301)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 302,  300, 1, 0, 90302)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 303,  300, 1, 0, 90303)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 400,    0, 0, 0, 90400)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 401,  400, 1, 0, 90401)
--insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 402,  400, 1, 0, 90402)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 403,  400, 1, 0, 90403)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 500,    0, 0, 0, 90500)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 501,  500, 1, 0, 90501)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 502,  500, 1, 0, 90502)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 503,  500, 1, 0, 90503)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 504,  500, 1, 0, 90504)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 505,  500, 1, 0, 90505)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 506,  500, 1, 0, 90506)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 507,  500, 1, 0, 90507)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 508,  500, 1, 1, 90508)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 509,  500, 1, 1, 90509)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 510,  500, 1, 1, 90510)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 512,  500, 1, 1, 90512)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 513,  500, 1, 1, 90513)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 514,  500, 1, 0, 90514)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 600,    0, 0, 0, 90600)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 601,  600, 1, 0, 90601)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 602,  600, 1, 0, 90602)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 604,  600, 1, 0, 90604)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 700,    0, 0, 0, 90700)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 710,  700, 1, 0, 90710)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 720,  700, 1, 0, 90720)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 730,  700, 1, 0, 90730)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 740,  700, 1, 0, 90740)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 750,  700, 1, 0, 90750)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 760,  700, 1, 0, 90760)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 770,  700, 1, 0, 90770)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 780,  700, 1, 0, 90780)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 781,  700, 1, 1, 90781)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 790,  700, 1, 0, 90790)






































insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 800,    0, 0, 0, 90800)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 801,  800, 1, 0, 90801)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 900,    0, 0, 0, 90900)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 901,  900, 1, 0, 90901)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 902,  900, 1, 0, 90902)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 903,  900, 1, 0, 90903)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values( 904,  900, 1, 0, 90904)

insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1000,    0, 0, 0, 91000)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1004, 1000, 1, 0, 91004)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1005, 1000, 1, 0, 91005)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1006, 1000, 1, 0, 91006)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1007, 1000, 1, 0, 91007)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1008, 1000, 1, 0, 91008)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1010, 1000, 1, 0, 91010)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1011, 1000, 1, 0, 91011)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1012, 1000, 1, 1, 91012)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1013, 1000, 1, 1, 91013)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1014, 1000, 1, 1, 91014)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1015, 1000, 1, 1, 91015)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1016, 1000, 1, 0, 91016)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1017, 1000, 1, 0, 91017)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1018, 1000, 1, 0, 91018)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1019, 1000, 1, 1, 91019)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1020, 1000, 1, 1, 91020)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1021, 1000, 1, 0, 91021)


insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1100,    0, 0, 0, 91100)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1101, 1100, 1, 0, 91101)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1102, 1100, 1, 0, 91102)
insert into MSP_WEB_SECURITY_FEATURES_ACTIONS (WSEC_FEA_ACT_ID, WSEC_FEA_ACT_PARENT, WSEC_IS_ACTION, WSEC_ON_OBJECT, WSEC_FEA_ACT_NAME_ID) values(1103, 1100, 1, 0, 91103)

set IDENTITY_INSERT MSP_WEB_SECURITY_FEATURES_ACTIONS OFF






declare @AdminGrpGUID_old         as uniqueidentifier, @AdminGrpGUID         as uniqueidentifier
declare @ExecutivesGrpGUID_old    as uniqueidentifier, @ExecutivesGrpGUID    as uniqueidentifier
declare @PortfolioMgrGrpGUID_old  as uniqueidentifier, @PortfolioMgrGrpGUID  as uniqueidentifier
declare @ProjMgrGrpGUID_old       as uniqueidentifier, @ProjMgrGrpGUID       as uniqueidentifier
declare @ResMgrGrpGUID_old        as uniqueidentifier, @ResMgrGrpGUID        as uniqueidentifier
declare @TeamLeadGrpGUID_old      as uniqueidentifier, @TeamLeadGrpGUID      as uniqueidentifier
declare @TeamMemberGrpGUID_old    as uniqueidentifier, @TeamMemberGrpGUID    as uniqueidentifier

select @AdminGrpGUID_old        = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=1
select @ExecutivesGrpGUID_old   = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=2
select @PortfolioMgrGrpGUID_old = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=3
select @ProjMgrGrpGUID_old      = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=4
select @ResMgrGrpGUID_old       = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=5
select @TeamLeadGrpGUID_old     = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=6
select @TeamMemberGrpGUID_old   = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=7

delete from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (select WSEC_REL_ID from MSP_WEB_SECURITY_SP_CAT_RELATIONS SCR, MSP_WEB_SECURITY_GROUPS GRP where GRP.WSEC_GRP_ID<=100 and GRP.WSEC_GRP_GUID=SCR.WSEC_SP_GUID and SCR.WSEC_REL_ID<=100)
delete from MSP_WEB_SECURITY_SP_CAT_RELATIONS where WSEC_REL_ID<=100

delete from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID<=100

set IDENTITY_INSERT MSP_WEB_SECURITY_GROUPS ON

insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(1, N'Administradores',     N'Grupo predeterminado de Project Server: Administradores')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(2, N'Ejecutivos',         N'Grupo predeterminado de Project Server: Ejecutivos')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(3, N'Jefes de cartera de proyectos', N'Grupo predeterminado de Project Server: Jefes de cartera de proyectos')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(4, N'Jefes de proyecto',   N'Grupo predeterminado de Project Server: Jefes de proyecto')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(5, N'Jefes de recursos',  N'Grupo predeterminado de Project Server: Jefes de recursos')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(6, N'Responsables de equipo',         N'Grupo predeterminado de Project Server: Responsables de grupo')
insert into MSP_WEB_SECURITY_GROUPS (WSEC_GRP_ID, WSEC_GRP_NAME, WSEC_GRP_DESC) values(7, N'Integrantes de grupo',       N'Grupo predeterminado de Project Server: Integrantes de grupo')

set IDENTITY_INSERT MSP_WEB_SECURITY_GROUPS OFF

select @AdminGrpGUID        = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=1
select @ExecutivesGrpGUID   = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=2
select @PortfolioMgrGrpGUID = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=3
select @ProjMgrGrpGUID      = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=4
select @ResMgrGrpGUID       = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=5
select @TeamLeadGrpGUID     = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=6
select @TeamMemberGrpGUID   = WSEC_GRP_GUID from MSP_WEB_SECURITY_GROUPS where WSEC_GRP_ID=7


if @AdminGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@AdminGrpGUID where WSEC_GRP_GUID=@AdminGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@AdminGrpGUID where WSEC_SP_GUID=@AdminGrpGUID_old
End

if @ExecutivesGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@ExecutivesGrpGUID where WSEC_GRP_GUID=@ExecutivesGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@ExecutivesGrpGUID where WSEC_SP_GUID=@ExecutivesGrpGUID_old
End

if @PortfolioMgrGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@PortfolioMgrGrpGUID where WSEC_GRP_GUID=@PortfolioMgrGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@PortfolioMgrGrpGUID where WSEC_SP_GUID=@PortfolioMgrGrpGUID_old
End

if @ProjMgrGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@ProjMgrGrpGUID where WSEC_GRP_GUID=@ProjMgrGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@ProjMgrGrpGUID where WSEC_SP_GUID=@ProjMgrGrpGUID_old
End

if @ResMgrGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@ResMgrGrpGUID where WSEC_GRP_GUID=@ResMgrGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@ResMgrGrpGUID where WSEC_SP_GUID=@ResMgrGrpGUID_old
End

if @TeamMemberGrpGUID_old IS NOT NULL
Begin
  UPDATE MSP_WEB_SECURITY_GROUP_MEMBERS set WSEC_GRP_GUID=@TeamMemberGrpGUID where WSEC_GRP_GUID=@TeamMemberGrpGUID_old
  UPDATE MSP_WEB_SECURITY_SP_CAT_RELATIONS set WSEC_SP_GUID=@TeamMemberGrpGUID where WSEC_SP_GUID=@TeamMemberGrpGUID_old
End






declare @AdminGUID as uniqueidentifier
select @AdminGUID = WRES_GUID from MSP_WEB_RESOURCES where WRES_ID=1
if (NOT EXISTS(select * from MSP_WEB_SECURITY_GROUP_MEMBERS where WSEC_GRP_GUID=@AdminGUID))
  insert into MSP_WEB_SECURITY_GROUP_MEMBERS (WSEC_GRP_GUID, WRES_GUID) values (@AdminGUID, @AdminGUID)




delete from MSP_WEB_SECURITY_OBJECT_TYPES where WSEC_OBJ_TYPE_ID<=1000

set IDENTITY_INSERT MSP_WEB_SECURITY_OBJECT_TYPES ON

insert into MSP_WEB_SECURITY_OBJECT_TYPES (WSEC_OBJ_TYPE_ID, WSEC_OBJ_TYPE_NAME) values(1, N'Project')
insert into MSP_WEB_SECURITY_OBJECT_TYPES (WSEC_OBJ_TYPE_ID, WSEC_OBJ_TYPE_NAME) values(2, N'Resource')
insert into MSP_WEB_SECURITY_OBJECT_TYPES (WSEC_OBJ_TYPE_ID, WSEC_OBJ_TYPE_NAME) values(3, N'View')
insert into MSP_WEB_SECURITY_OBJECT_TYPES (WSEC_OBJ_TYPE_ID, WSEC_OBJ_TYPE_NAME) values(4, N'Model')

set IDENTITY_INSERT MSP_WEB_SECURITY_OBJECT_TYPES OFF






declare @MaxDefProjRuleID int;  Set @MaxDefProjRuleID = 5
delete from MSP_WEB_SECURITY_OBJECT_RULES where WSEC_OBJ_TYPE=1 and WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefProjRuleID
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 0, N'All current and future projects')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 1, N'All projects listed in category')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 2, N'All current and future projects that I manage')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 3, N'All current and future projects that I have assignments in')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 4, N'All current and future projects that are managed by resources whom I manage')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(1, 5, N'All current and future projects that are assigned to resources whom I manage')


declare @MaxDefResRuleID int;  Set @MaxDefResRuleID = 5
delete from MSP_WEB_SECURITY_OBJECT_RULES where WSEC_OBJ_TYPE=2 and WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefResRuleID
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 0, N'All current and future resources')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 1, N'All resources listed in category')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 2, N'My own information')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 3, N'All resources in projects that I manage')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 4, N'All resources that I manage')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(2, 5, N'All resources that I manage directly')




declare @MaxDefModelRuleID int;  Set @MaxDefModelRuleID = 3
delete from MSP_WEB_SECURITY_OBJECT_RULES where WSEC_OBJ_TYPE=4 and WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefModelRuleID
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(4, 0, N'All current and future models')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(4, 1, N'All models listed in category')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(4, 2, N'All my own models')
insert into MSP_WEB_SECURITY_OBJECT_RULES (WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE, WSEC_OBJ_RULE_DESC) values(4, 3, N'All models created by resources that I manage')




delete from MSP_WEB_SECURITY_CATEGORIES where WSEC_CAT_ID<=100

set IDENTITY_INSERT MSP_WEB_SECURITY_CATEGORIES ON





insert into MSP_WEB_SECURITY_CATEGORIES (WSEC_CAT_ID, WSEC_CAT_NAME, WSEC_CAT_DESC) values (1, N'Mi organización', N'Categ. predet. Project Server: Mi organización')
insert into MSP_WEB_SECURITY_CATEGORIES (WSEC_CAT_ID, WSEC_CAT_NAME, WSEC_CAT_DESC) values (2, N'Mis proyectos',     N'Categ. predet. Project Server: Mis proyectos')
insert into MSP_WEB_SECURITY_CATEGORIES (WSEC_CAT_ID, WSEC_CAT_NAME, WSEC_CAT_DESC) values (3, N'Mis tareas',        N'Categ. predet. Project Server: Mis tareas')
insert into MSP_WEB_SECURITY_CATEGORIES (WSEC_CAT_ID, WSEC_CAT_NAME, WSEC_CAT_DESC) values (4, N'Mis recursos',    N'Categ. predet. Project Server: Mis recursos')
insert into MSP_WEB_SECURITY_CATEGORIES (WSEC_CAT_ID, WSEC_CAT_NAME, WSEC_CAT_DESC) values (5, N'Superviso directamente a',N'Categ. predet. Project Server: Mis informes directos')

set IDENTITY_INSERT MSP_WEB_SECURITY_CATEGORIES OFF





delete from MSP_WEB_SECURITY_CATEGORY_RULES where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE=1 and (WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefProjRuleID)
delete from MSP_WEB_SECURITY_CATEGORY_RULES where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE=2 and (WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefResRuleID)
delete from MSP_WEB_SECURITY_CATEGORY_RULES where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE=3
delete from MSP_WEB_SECURITY_CATEGORY_RULES where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE=4 and (WSEC_OBJ_RULE_TYPE>=0 and WSEC_OBJ_RULE_TYPE<=@MaxDefModelRuleID)






insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (1, 1, 0)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (1, 2, 0)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (1, 4, 0)










insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 1, 2)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 1, 3)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 1, 5)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 2, 2)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 2, 3)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 4, 2)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (2, 4, 3)





insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (3, 1, 3)
insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (3, 2, 2)




insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (4, 2, 4)




insert into MSP_WEB_SECURITY_CATEGORY_RULES (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_RULE_TYPE) values (5, 2, 5)





delete from MSP_WEB_SECURITY_CATEGORY_OBJECTS where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE<=1000 and WSEC_OBJ_TYPE<>3
delete from MSP_WEB_SECURITY_CATEGORY_OBJECTS where WSEC_CAT_ID<=100 and WSEC_OBJ_TYPE=3 and WSEC_OBJ_ID<100


insert into MSP_WEB_SECURITY_CATEGORY_OBJECTS (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_ID) select 1, 3, WVIEW_ID from MSP_WEB_VIEW_REPORTS where WVIEW_ID<100


insert into MSP_WEB_SECURITY_CATEGORY_OBJECTS (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_ID) select 2, 3, WVIEW_ID from MSP_WEB_VIEW_REPORTS where WVIEW_ID<100


insert into MSP_WEB_SECURITY_CATEGORY_OBJECTS (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_ID) select 3, 3, WVIEW_ID from MSP_WEB_VIEW_REPORTS where WVIEW_ID<100 and WVIEW_TYPE=2;


insert into MSP_WEB_SECURITY_CATEGORY_OBJECTS (WSEC_CAT_ID, WSEC_OBJ_TYPE, WSEC_OBJ_ID) select 4, 3, WVIEW_ID from MSP_WEB_VIEW_REPORTS where WVIEW_ID<100 and WVIEW_TYPE=3;






set IDENTITY_INSERT MSP_WEB_SECURITY_SP_CAT_RELATIONS ON


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (1, @AdminGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (2, @AdminGrpGUID, 1)


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (3, @ExecutivesGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (4, @ExecutivesGrpGUID, 1)


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (5, @PortfolioMgrGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (6, @PortfolioMgrGrpGUID, 1)



insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (7, @ProjMgrGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (8, @ProjMgrGrpGUID, 2)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (17,@ProjMgrGrpGUID, 1)



insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (9,  @ResMgrGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (10, @ResMgrGrpGUID, 2)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (18, @ResMgrGrpGUID, 4)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (19, @ResMgrGrpGUID, 5)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (20, @ResMgrGrpGUID, 1)


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (11, @TeamLeadGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (12, @TeamLeadGrpGUID, 2)


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (13, @TeamMemberGrpGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (14, @TeamMemberGrpGUID, 3)


insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (15, @AdminGUID, 0)
insert into MSP_WEB_SECURITY_SP_CAT_RELATIONS (WSEC_REL_ID, WSEC_SP_GUID, WSEC_CAT_ID) values (16, @AdminGUID, 1)

set IDENTITY_INSERT MSP_WEB_SECURITY_SP_CAT_RELATIONS OFF






delete from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID<=100


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 1, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_ON_OBJECT=0

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 2, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_ON_OBJECT=1


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 3, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,105,106,107,150,151,152,301,302,303,501,502,503,504,505,506,507,601,602,604,1101,1102,1103,1017)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 4, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (508,509,510,512,1014)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 5, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,105,106,107,150,151,152,501,502,503,504,505,506,507,730,760,801,1004,1005,1006,1007,1010,1011,1016,1017,1021,1101,1102,1103)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 6, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (508,509,510,512,781,1012,1013,1014,1015,1019,1020)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 7, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,105,106,107,150,151,152,201,202,203,204,210,301,302,303,401,403,501,502,503,601,602,604,801,901,902,903,904,1004,1006,1010,1011,1016,1017,1018,1021,1101,1102,1103)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 8, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (213,508,509,510,512,781,1012,1013,1014,1019)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 17, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (1014,1020)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 9, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,105,106,107,150,151,152,207,211,301,302,303,501,502,503,504,507,601,602,604,1005,1006,1010,1017,1021,1101,1102,1103)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 10, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (213,508,512)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 18, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (510,1014,1015,1020)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 19, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (212)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 20, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (1019)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 11, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,105,106,107,150,151,152,301,302,303,502,601,602,604,1017,1101,1102,1103)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 12, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (213,508,509,510,512)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 13, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (101,102,103,104,106,107,150,151,152,201,202,204,206,210,301,302,303,501,503,601,602,1017,1101,1102,1103)

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 14, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_FEA_ACT_ID in (213,508,509,512)


insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 15, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_ON_OBJECT=0

insert into MSP_WEB_SECURITY_SP_CAT_PERMISSIONS (WSEC_REL_ID,WSEC_FEA_ACT_ID,WSEC_ALLOW,WSEC_DENY,WSEC_ACCESS) 
  select 16, WSEC_FEA_ACT_ID, 1, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_ON_OBJECT=1




delete from MSP_WEB_SECURITY_ORG_PERMISSIONS

insert into MSP_WEB_SECURITY_ORG_PERMISSIONS (WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS, WSEC_PAID) select WSEC_FEA_ACT_ID, 1, 0, 1, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS
update MSP_WEB_SECURITY_ORG_PERMISSIONS set WSEC_ALLOW=0, WSEC_DENY=1 where WSEC_FEA_ACT_ID=211
update MSP_WEB_SECURITY_ORG_PERMISSIONS set WSEC_ALLOW=0, WSEC_DENY=1 where WSEC_FEA_ACT_ID=212





delete from MSP_WEB_SECURITY_TEMPLATES where WSEC_TMPL_ID <= 1000

SET IDENTITY_INSERT MSP_WEB_SECURITY_TEMPLATES ON;

insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(1, N'Administrador',       N'Plantilla de permisos predeterminada de Project Server para administradores')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(2, N'Ejecutivos',           N'Plantilla de permisos predeterminada de Project Server para ejecutivos')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(3, N'Jefe de cartera de proyectos',   N'Plantilla de permisos predeterminada de Project Server para los jefes de cartera de proyectos')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(4, N'Jefe de proyecto',     N'Plantilla de permisos predeterminada de Project Server para los jefes de proyecto')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(5, N'Jefe de recursos',    N'Plantilla de permisos predeterminada de Project Server para jefes de recursos')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(6, N'Responsable de equipo',           N'Plantilla de permisos predeterminada de Project Server para responsables de grupo')
insert into MSP_WEB_SECURITY_TEMPLATES (WSEC_TMPL_ID, WSEC_TMPL_NAME, WSEC_TMPL_DESC) values(7, N'Integrante de grupo',            N'Plantilla de permisos predeterminada de Project Server para recursos')

SET IDENTITY_INSERT MSP_WEB_SECURITY_TEMPLATES OFF;





delete from MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS where WSEC_TMPL_ID <= 1000


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 1, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (1,2)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 1, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (1,2))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 2, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (3,4)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 2, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (3,4))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 3, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (5,6)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 3, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (5,6))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 4, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (7,8)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 4, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (7,8))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 5, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (9,10)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 5, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (9,10))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 6, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (11,12)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 6, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (11,12))


insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 7, WSEC_FEA_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (13,14)

insert into MSP_WEB_SECURITY_TEMPLATE_PERMISSIONS (WSEC_TMPL_ID, WSEC_ACT_ID, WSEC_ALLOW, WSEC_DENY, WSEC_ACCESS) 
   select 7, WSEC_FEA_ACT_ID, 0, 0, 1 from MSP_WEB_SECURITY_FEATURES_ACTIONS where WSEC_IS_ACTION=1 and WSEC_FEA_ACT_ID not in (select WSEC_FEA_ACT_ID from MSP_WEB_SECURITY_SP_CAT_PERMISSIONS where WSEC_REL_ID in (13,14))




delete from MSP_WEB_SECURITY_MENUS where WSEC_MENU_ID<=10000

SET IDENTITY_INSERT MSP_WEB_SECURITY_MENUS ON;


insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  100, 50100,   -1,  1,    0, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  101, 50101,  100,  2,  101, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  102, 50102,  100,  3,  102, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  103, 50103,  100,  4,  103, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  104, 50104,  100,  5,  104, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  106, 50106,  100,  1,  100, 0, 0)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  200, 50200,   -1,  2,    0, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  201, 50201,  200,  1,  201, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  202, 50202,  200,  2,  202, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  203, 50203,  200,  4,  203, 0, 0)
--insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  204, 50204,  200,  6,  204, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  205, 50205,  200,  6,  205, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  206, 50206,  200,  5,  209, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  210, 50210,  200,  3,  210, 0, 0)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  300, 50300,   -1,  3,    0, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  301, 50301,  300,  1,  301, 0, 0, 51000)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  302, 50302,  300,  2,  302, 0, 0, 51002)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  303, 50303,  300,  3,  303, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  305, 50305,  300,  4,  305, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  306, 50306,  300,  5,  306, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  307, 50307,  300,  6,  307, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  310, 50310,  300,  7,  313, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  311, 50311,  300,  8,  314, 0, 0)



insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  400, 50400,   -1,  4,    0, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  401, 50401,  400,  1,  405, 0, 0, 51004)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  402, 50402,  400,  3,  402, 0, 0, 51001)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  403, 50403,  400,  2,  403, 0, 0, 51003)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  406, 50406,  400,  4,  406, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  407, 50407,  400,  5,  407, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  408, 50408,  400,  6,  408, 0, 0)



insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  500, 50500,   -1,  5,  501, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  501, 50501,  500,  1,  501, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  502, 50502,  500,  2,  502, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  503, 50503,  500,  3,  503, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  504, 50504,  500,  5,  504, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  505, 50505,  500,  6,  505, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  506, 50506,  500,  4,  506, 0, 0)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  600, 50600,   -1,  6,  601, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  601, 50601,  600,  1,  601, 0, 0)
--insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  602, 50602,  600,  2,  602, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  603, 50603,  600,  2,  603, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  604, 50604,  600,  3,  604, 0, 0)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  700, 50700,   -1,  9,  700, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  701, 50701,  700,  1,  701, 0, 0, 51006)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  702, 50702,  700,  2,  702, 0, 0, 51006)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  703, 50703,  700,  3,  703, 0, 0, 51006)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  800, 50800,   -1,  8,  802, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  801, 50801,  800,  1,  801, 0, 0, 51005)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  802, 50802,  800,  2,  802, 0, 0, 51005)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  803, 50803,  800,  3,  803, 0, 0, 51005)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL,WSEC_MENU_LINKGROUP_NAME_ID) values (  804, 50804,  800,  4,  804, 0, 0, 51005)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values ( 1000, 51010,   -1,  7, 1000, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values ( 1001, 51011, 1000,  1, 1001, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values ( 1002, 51012, 1000,  2, 1002, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values ( 1003, 51013, 1000,  3, 1003, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values ( 1004, 51014, 1000,  4, 1004, 0, 0)

insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  900, 50900,   -1, 10,  900, 0, 1)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  901, 50901,  900,  1,  911, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  902, 50902,  900,  2,  921, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  903, 50903,  900,  3,  930, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  904, 50904,  900,  4,  941, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  905, 50905,  900,  7,  951, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  906, 50906,  900,  6,  962, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  907, 50907,  900,  9,  970, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  908, 50908,  900,  8,  980, 0, 0)
insert into MSP_WEB_SECURITY_MENUS (WSEC_MENU_ID,WSEC_MENU_NAME_ID,WSEC_MENU_PARENT_ID,WSEC_MENU_SEQ,WSEC_MENU_PAGE_ID,WSEC_MENU_IS_CUSTOM,WSEC_MENU_IS_TOP_LEVEL) values (  909, 50909,  900,  5,  993, 0, 0)

SET IDENTITY_INSERT MSP_WEB_SECURITY_MENUS OFF;







delete from MSP_WEB_SECURITY_PAGES where WSEC_PAGE_ID<=10000

SET IDENTITY_INSERT MSP_WEB_SECURITY_PAGES ON;


insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL,WSEC_PAGE_CAN_OFFLINE) values (  100,  100,  106,  101, N'w0HTOC.htm?PWAHELPTOP=1', N'Home/HomePage.asp',1)
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  101,  101,  101,  103, N'w0HChPsw.htm?PWAHELPTOP=1',     N'Home/Password.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  102,  102,  102,  104, N'w0HSetNo.htm?PWAHELPTOP=1',     N'Notifications/Self_Notifications.asp?AlertUI=7')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  103,  103,  103,  105, N'w0HSetNo.htm?PWAHELPTOP=1',     N'Notifications/Mgr_Notifications.asp?AlertUI=7')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  104,  104,  104,  106, N'w0HGoOff.htm?PWAHELPTOP=1',     N'Home/Offline.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  105,  105,  105,    0, N'w0HTOC.htm?PWAHELPTOP=1',       N'Logon/Logoff.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL,WSEC_PAGE_CAN_OFFLINE) values (  201,  201,  201,  201, N'w0TTOC.htm?PWAHELPTOP=1', N'Tasks/TasksPage.asp',1)
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  202,  202,  202,  202, N'w0TCreNT.htm?PWAHELPTOP=1',                     N'Tasks/NewTaskPage.asp?_ID=-1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  203,  201,  203,  203, N'w0TDelgT.htm?PWAHELPTOP=1',                      N'Tasks/TasksPage.asp?Delegation=1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  205,  205,  205,  206, N'w1TNonW.htm?PWAHELPTOP=1',  N'Tasks/nwrkntfy.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  206,  206,  203,  203, N'w0TDelgT.htm?PWAHELPTOP=1',                      N'Tasks/DelegatePage.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  207,  207,  203,  203, N'w0TTOC.htm?PWAHELPTOP=1',                          N'Tasks/RequestUpdate.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  208,  208,  306,  301, N'w0TCreNT.htm?PWAHELPTOP=1',                     N'Tasks/NewTaskPage.asp?_ID=-1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  209,  209,  206,  201, N'w1TOutlk.htm?PWAHELPTOP=1',                          N'Tasks/outladdn.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  210,  210,  210,  210, N'w0TTOC.htm?PWAHELPTOP=1',                          N'Tasks/newassn.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  301,  301,  301,  503, N'w0PTOC.htm?PWAHELPTOP=1',                   N'Views/PortfolioView.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  302,  302,  302,  505, N'w0RAnRes.htm?PWAHELPTOP=1',       N'Views/VisionView.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  303,  303,  303,  506, N'w0PMdlPj.htm?PWAHELPTOP=1',          N'Modeling/Models.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  305,  305,  305,  301, N'w0PCrTDL.htm?PWAHELPTOP=1',        N'Tasks/NewTaskList.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL,WSEC_PAGE_DATABASE_SETTINGS) values (  306,  306,  306,  301, N'w0PMgTDL.htm?PWAHELPTOP=1', N'Tasks/TaskListPage.asp',N'<dataspace id="306" storage="database"><scope name="commoncontrols"><property name="GroupBy0">2</property><property name="GroupBy1">0</property><property name="SortBy">Start</property><property name="SortDir">0</property><property name="AutoFilter">False</property></scope></dataspace>')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  307,  307,  307,  301, N'w0PTOC.htm?PWAHELPTOP=1',                   N'Tasks/TaskListOptions.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  308,  308,  308, null, N'w0RSaveL.htm?PWAHELPTOP=1',                   N'Views/OrganizeFavs.asp?FavID=0')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  309,  309,  301,  501, N'w0PTOC.htm?PWAHELPTOP=1',   N'Views/ProjectReport.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  310,  310,  301,    0, N'w0PTOC.htm?PWAHELPTOP=1',	N'Views/TaskListReport.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  311,  311,  303,  506, N'w0PMdlPj.htm?PWAHELPTOP=1',          N'Modeling/Modeler.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  312,  312,  303,  506, N'w0PMdlPj.htm?PWAHELPTOP=1',          N'Modeling/Modelmulti.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  313,  313,  310, 1017, N'w1PCheck.htm?PWAHELPTOP=1',                   N'Tasks/checkin.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  314,  314,  311,  207, N'w1PNonWk.htm?PWAHELPTOP=1',                   N'Tasks/AdmProj.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  400,  400,  400, null, N'w0RTOC.htm?PWAHELPTOP=1',                 N'Views/ViewsPage.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  405,  405,  401,  504, N'w0RTOC.htm?PWAHELPTOP=1',                 N'Views/ResourcesRegisterView.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  401,  401,  401,  507, N'w0RVwAv.htm?PWAHELPTOP=1',    N'Views/ResGraph.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  402,  402,  402,  502, N'w0RVwAs.htm?PWAHELPTOP=1', N'Views/WebclientView.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  403,  403,  403,  505, N'w0RAnRes.htm?PWAHELPTOP=1',     N'Views/VisionView.asp?resource=1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  406,  406,  406,  514, N'w1RAdjuA.htm?PWAHELPTOP=1',     N'Views/AdjActs.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  407,  407,  407,  211, N'w1RApprv.htm?PWAHELPTOP=1',     N'Views/TSSum.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  408,  408,  408,  211, N'w1RApprv.htm?PWAHELPTOP=1',     N'Views/TSApp.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL,WSEC_PAGE_CAN_OFFLINE) values (  501,  501,  501, null, N'w0STOC.htm?PWAHELPTOP=1',   N'StatusReports/StatusReports.asp',1)
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  502,  502,  502,  602, N'w0SSubSR.htm?PWAHELPTOP=1',				N'StatusReports/EnterStatusReport.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  503,  503,  503,  601, N'w0SMgASR.htm?PWAHELPTOP=1',				N'StatusReports/MyStatusReports.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  504,  504,  504,  604, N'w0SVwSR.htm?PWAHELPTOP=1',				N'StatusReports/TeamStatusReports.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  505,  505,  505,  604, N'w0STOC.htm?PWAHELPTOP=1',				N'StatusReports/StatusReportWizard1.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  506,  506,  506,  601, N'w0SVwSR.htm?PWAHELPTOP=1',           			N'StatusReports/MiscStatusReports.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  507,  507,  500,  201, N'w0SSubSR.htm?PWAHELPTOP=1',          			N'StatusReports/InsertTask.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  508,  508,  504,  604, N'w0SVwSR.htm?PWAHELPTOP=1',				N'StatusReports/MergedStatusReport.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  509,  509,  504,  604, N'w0SVwSR.htm?PWAHELPTOP=1',				N'StatusReports/MultipleStatusReport.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  510,  510,  503,  601, N'w0SSubSR.htm?PWAHELPTOP=1',				N'StatusReports/PastStatusReport.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  601,  601,  601,  401, N'w0UTOC.htm?PWAHELPTOP=1',           N'Transactions/TaskTransactions.asp')
--insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  602,  602,  602,  402, N'ps_p10_U_UpdateChanges.htm?PWAHELPTOP=1', N'Transactions/CalendarTransactions.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  603,  603,  603,  403, N'w0USetRu.htm?PWAHELPTOP=1',      N'Home/Rules.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  604,  604,  604,  401, N'w0UViewH.htm?PWAHELPTOP=1',   N'Transactions/TaskTransHistory.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  700,  700,  700, 1101, N'w0DTOC.htm?PWAHELPTOP=1',				N'Library/WssMain.asp?list=doc')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  701,  701,  701, 1101, N'w0DTOC.htm?PWAHELPTOP=1',				N'Library/WssMain.asp?list=doc')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  702,  702,  702, 1101, N'w0DTOC.htm?PWAHELPTOP=1',				N'Library/WssMain.asp?list=doc')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  703,  703,  703, 1101, N'w0DTOC.htm?PWAHELPTOP=1',				N'DocLib/DocLibMain.asp?ProjID=-99')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  800,  800,  800, 1102, N'w0ITOC.htm?PWAHELPTOP=1', N'Library/WssMain.asp?list=iss')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  801,  801,  801, 1102, N'w0ITOC.htm?PWAHELPTOP=1', N'Issues/IssueShell.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  802,  802,  802, 1102, N'w0ITOC.htm?PWAHELPTOP=1', N'Library/WssMain.asp?list=iss')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  803,  803,  803, 1102, N'w0ITOC.htm?PWAHELPTOP=1', N'Issues/IssueMain.asp?my=1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  804,  804,  804, 1102, N'w0ITOC.htm?PWAHELPTOP=1', N'Issues/IssueMain.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values ( 1000, 1000, 1000, 1103, N'w1KTOC.htm?PWAHELPTOP=1', N'Library/WssMain.asp?list=ris')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values ( 1001, 1001, 1001, 1103, N'w1KTOC.htm?PWAHELPTOP=1', N'Risks/RiskShel.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values ( 1002, 1002, 1002, 1103, N'w1KTOC.htm?PWAHELPTOP=1', N'Library/WssMain.asp?list=ris')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values ( 1003, 1003, 1003, 1103, N'w1KTOC.htm?PWAHELPTOP=1', N'Risks/RiskMain.asp?my=1')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values ( 1004, 1004, 1004, 1103, N'w1KTOC.htm?PWAHELPTOP=1', N'Risks/RiskMain.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  900,  900,  900, null, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Admin.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  911,  911,  901,  710, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_Users.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  912,  912,  901,  710, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_Users_AddModify.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  913,  913,  901,  710, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_Groups.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  914,  914,  901,  710, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_Groups_AddModify.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  921,  921,  902,  720, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_DefineCategory.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  922,  922,  902,  720, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_EditCategory.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  923,  923,  902,  720, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Sec_Templates.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  924,  924,  902,  720, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/EditTemplate.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  926,  926,  902,  720, N'w0AAuthO.htm?PWAHELPTOP=1',    N'Admin/authenticate.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  930,  930,  903,  730, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/views_specify.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  931,  931,  903,  730, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/views_addmodify.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  932,  932,  903,  730, N'w0AMgDSN.htm?PWAHELPTOP=1',               N'Admin/defineviewsdsn.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  941,  941,  904,  740, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/sec_organization.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  942,  942,  904,  740, N'w0AModMe.htm?PWAHELPTOP=1',               N'Admin/sec_editmenu.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  951,  951,  905,  750, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Timeperiod.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  952,  952,  905,  750, N'w0AGtCFO.htm?PWAHELPTOP=1',  N'Admin/DefineGantt.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  953,  953,  905,  750, N'w0AGrpFO.htm?PWAHELPTOP=1',			N'Admin/DefineGroups.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  954,  954,  905,  750, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Calendar.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  956,  956,  905,  750, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/theme.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  957,  957,  905,  750, N'w0ANotif.htm?PWAHELPTOP=1',            N'Admin/notification.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  962,  962,  906,  760, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/cube_settings.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  963,  963,  906,  760, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Ent_CheckIn.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  964,  964,  906,  760, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Ent_Versions.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  965,  965,  906,  760, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/Ent_ResCheckin.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  966,  966,  301, 1010, N'w1PBuild.htm?PWAHELPTOP=1',               N'Admin/Ent_Team.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  970,  970,  907,  770, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/License.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  980,  980,  908,  780, N'w0ACUpDB.htm?PWAHELPTOP=1',          N'Admin/DBCleanup.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  985,  985,  900, null, N'w0ATOC.htm?PWAHELPTOP=1',                 N'Admin/EITInfo.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  990,  990,  909,  790, N'w0ASPDfS.htm?PWAHELPTOP=1',N'Admin/DefaultSTSSettings.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  991,  991,  909,  790, N'w0AMgSPS.htm?PWAHELPTOP=1',  N'Admin/ManageSTS.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  992,  992,  909,  790, N'w0ASynSP.htm?PWAHELPTOP=1',    N'Admin/SynchAdm.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  993,  993,  909,  790, N'w0ARegSP.htm?PWAHELPTOP=1',       N'Admin/StsAdMod.asp')
insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_MASTER_PAGE_ID,WSEC_PAGE_MENU_ID,WSEC_PAGE_ACT_ID,WSEC_PAGE_HELP_URL,WSEC_PAGE_URL) values (  994,  994,  909,  790, N'w1APrtSt.htm?PWAHELPTOP=1',  N'Admin/portal.asp')

insert into MSP_WEB_SECURITY_PAGES (WSEC_PAGE_ID,WSEC_PAGE_DATABASE_SETTINGS,WSEC_PAGE_SESSION_SETTINGS) values ( -1, NCHAR(10)+NCHAR(13)+NCHAR(9)+N'<dataspace id="-1" storage="database">'+ NCHAR(10)+NCHAR(13)+NCHAR(9)+N'</dataspace>',NCHAR(10)+NCHAR(13)+NCHAR(9)+N'<dataspace id="-1" storage="session">'+ NCHAR(10)+NCHAR(13)+NCHAR(9)+N'</dataspace>') 

SET IDENTITY_INSERT MSP_WEB_SECURITY_PAGES OFF;




DELETE MSP_WEB_TIME_PERIODS WHERE WPRD_ID<100
SET IDENTITY_INSERT MSP_WEB_TIME_PERIODS ON;
INSERT INTO MSP_WEB_TIME_PERIODS (WPRD_ID, WPRD_START_DATE,WPRD_FINISH_DATE,WPRD_STATE) VALUES (1,{ts'1984-01-01 00:00:00'},{ts'1999-12-31 23:59:59'},1)
INSERT INTO MSP_WEB_TIME_PERIODS (WPRD_ID, WPRD_START_DATE,WPRD_FINISH_DATE,WPRD_STATE) VALUES (2,{ts'2000-01-01 00:00:00'},{ts'2049-12-31 23:59:59'},1)

IF EXISTS (SELECT * FROM MSP_WEB_TIME_PERIODS WHERE WPRD_ID>=100)
BEGIN
 	UPDATE MSP_WEB_TIME_PERIODS SET WPRD_FINISH_DATE = T1.MinDate FROM (SELECT DATEADD(second, -1,MIN (WPRD_START_DATE)) AS MinDate FROM MSP_WEB_TIME_PERIODS WHERE WPRD_ID>=100) T1 WHERE WPRD_ID=1
	UPDATE MSP_WEB_TIME_PERIODS SET WPRD_START_DATE  = T1.MaxDate FROM (SELECT DATEADD(second,  1,MAX (WPRD_FINISH_DATE)) AS MaxDate FROM MSP_WEB_TIME_PERIODS WHERE WPRD_ID>=100) T1 WHERE WPRD_ID=2
END

SET IDENTITY_INSERT MSP_WEB_TIME_PERIODS OFF;




DELETE FROM MSP_WEB_ADMIN_CUBE
INSERT INTO MSP_WEB_ADMIN_CUBE (WADMIN_CUBE_BUILD,WADMIN_CUBE_OLAP_SERVER,WADMIN_CUBE_NAME,WADMIN_CUBE_DESCRIPTION,WADMIN_CUBE_DATE_RANGE,WADMIN_CUBE_DATE_RANGE_NEXT_NUM,WADMIN_CUBE_DATE_RANGE_NEXT_UNIT,WADMIN_CUBE_DATE_RANGE_PAST_NUM,WADMIN_CUBE_DATE_RANGE_PAST_UNIT,WADMIN_CUBE_DATE_RANGE_FROM,WADMIN_CUBE_DATE_RANGE_TO,WADMIN_RES_DATE_RANGE,WADMIN_RES_DATE_RANGE_NEXT_NUM,WADMIN_RES_DATE_RANGE_NEXT_UNIT,WADMIN_RES_DATE_RANGE_PAST_NUM,WADMIN_RES_DATE_RANGE_PAST_UNIT,WADMIN_RES_DATE_RANGE_FROM,WADMIN_RES_DATE_RANGE_TO,WADMIN_UPDATE_RECUR,WADMIN_UPDATE_FREQ_EVERY,WADMIN_UPDATE_FREQ_UNIT,WADMIN_UPDATE_FREQ_START_DATE,WADMIN_UPDATE_FREQ_START_TIME,WADMIN_UPDATE_RES,WADMIN_UPDATE_CUBE,WADMIN_AUTO_LAST_RUN) VALUES (0,'','','',0,1,0,1,0,'01-01-1900 00:00:00.000','01-01-1900 00:00:00.000',1,4,1,0,1,'01-01-1900 00:00:00.000','01-01-1900 00:00:00.000',0,1,1,'01-01-1900 00:00:00.000',0,0,0,'01-01-1900 00:00:00.000')

DELETE FROM MSP_WEB_ADMIN_AD
INSERT INTO MSP_WEB_ADMIN_AD (WADMIN_AD_GRP_ENABLE_UPDATE,WADMIN_AD_GRP_UPDATE_FREQ_EVERY,WADMIN_AD_GRP_UPDATE_FREQ_UNIT,WADMIN_AD_ERESPOOL_ENABLE_UPDATE,WADMIN_AD_ERESPOOL_UPDATE_FREQ_EVERY,WADMIN_AD_ERESPOOL_UPDATE_FREQ_UNIT) VALUES (0,1,1,0,1,1)
