alter table cf_menu
add mobile_object_type varchar(20) NULL

--Insert Cf_module
Insert cf_module (language_cd, cf_module_module_cd, cf_module_desc, ico_name, cf_module_seq, audit_user, audit_date)  Select language_cd, 'MBL', 'Mobile', '(Default)', (select max(cf_module_seq) + 1 from cf_module), 'admin', GetDate()  From cf_language  
GO

Declare @f_menu_id numeric

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_ast_create_asset',N'Asset - Create Asset',N'M',N'MBL',N'(Default)',NULL,N'1',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Asset',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_ast_asset_master',N'Asset - Asset Master',N'M',N'MBL',N'(Default)',NULL,N'2',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Asset',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_ast_scan_Asset',N'Asset - Scan Asset',N'M',N'MBL',N'(Default)',NULL,N'3',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Asset',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_asset_spare_list',N'Asset - More - Asset Spare List',N'M',N'MBL',N'(Default)',NULL,N'4',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Asset',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_asset_wo_hisotry',N'Asset - More - Asset WO History',N'M',N'MBL',N'(Default)',NULL,N'5',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Asset',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

----------------

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wr_create_wr',N'Work Request - Create Work Request',N'M',N'MBL',N'(Default)',NULL,N'6',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Request',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wr_wr_listing',N'Work Request - WR Listing',N'M',N'MBL',N'(Default)',NULL,N'7',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Request',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wr_wr_listing_all_grp',N'Work Request - WR Listing (All Work Group)',N'M',N'MBL',N'(Default)',NULL,N'8',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Request',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wr_wr_listing_my_grp',N'Work Request - WR Listing (My Work Group)',N'M',N'MBL',N'(Default)',NULL,N'9',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Request',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wr_my_wr',N'Work Request - My WR',N'M',N'MBL',N'(Default)',NULL,N'10',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Request',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wo_dashboard',N'Work Order - WO Dashboard',N'M',N'MBL',N'(Default)',NULL,N'11',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wo_create_wo',N'Work Order - Create WO',N'M',N'MBL',N'(Default)',NULL,N'12',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wo_wo_listing',N'Work Order - WO Listing',N'M',N'MBL',N'(Default)',NULL,N'13',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_wo_my_wo',N'Work Order - My Work Order',N'M',N'MBL',N'(Default)',NULL,N'14',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_verify_asset',N'Work Order - More - Verify Asset',N'M',N'MBL',N'(Default)',NULL,N'15',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_timecard',N'Work Order - More - WO Timecard',N'M',N'MBL',N'(Default)',NULL,N'16',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_checklist',N'Work Order - More - WO Checklist',N'M',N'MBL',N'(Default)',NULL,N'17',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_sub_wo',N'Work Order - More - WO Sub Work Order',N'M',N'MBL',N'(Default)',NULL,N'18',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_contract_request',N'Work Order - More - WO Contract Request',N'M',N'MBL',N'(Default)',NULL,N'19',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_material_request',N'Work Order - More - WO Material Request',N'M',N'MBL',N'(Default)',NULL,N'20',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_acknowledgement',N'Work Order - More - WO Acknowledgement',N'M',N'MBL',N'(Default)',NULL,N'21',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_completion',N'Work Order - More - WO Completion',N'M',N'MBL',N'(Default)',NULL,N'22',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_chargeable',N'Work Order - More - WO Chargeable',N'M',N'MBL',N'(Default)',NULL,N'23',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql 
N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'o_wo_downtime',N'Work Order - More - WO downtime',N'M',N'MBL',N'(Default)',NULL,N'35',N'0',N'0',N'0',N'0',N'O',N'admin','2021-10-26 10:07:24.460','Work Order',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template


--------------
exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_dashboard',N'Inventory - Inventory Dashboard',N'M',N'MBL',N'(Default)',NULL,N'24',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_stock_master',N'Inventory - Stock Master',N'M',N'MBL',N'(Default)',NULL,N'25',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_stock_issue',N'Inventory - Stock Issue',N'M',N'MBL',N'(Default)',NULL,N'26',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_stock_receive',N'Inventory - Stock Receive',N'M',N'MBL',N'(Default)',NULL,N'27',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_stock_return',N'Inventory - Stock Return',N'M',N'MBL',N'(Default)',NULL,N'28',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_inv_stock_take',N'Inventory - Stock Take',N'M',N'MBL',N'(Default)',NULL,N'29',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Inventory',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

--

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_appr_wr_approval_list_all_grp',N'Approval - WR Approval List (All Group)',N'M',N'MBL',N'(Default)',NULL,N'30',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Approval',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 


exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_appr_wr_approval_list_my_grp',N'Approval - WR Approval List (My Group)',N'M',N'MBL',N'(Default)',NULL,N'31',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Approval',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_appr_mr_approval',N'Approval - MR Approval',N'M',N'MBL',N'(Default)',NULL,N'32',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Approval',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_appr_pr_approval',N'Approval - PR Approval',N'M',N'MBL',N'(Default)',NULL,N'33',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Approval',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 

exec sp_executesql N'INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ( @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, @P18, @P19, @P20 )',N'@P1 nvarchar(20),@P2 nvarchar(60),@P3 nvarchar(60),@P4 nvarchar(1),@P5 nvarchar(4),@P6 nvarchar(20),@P7 nvarchar(255),@P8 nvarchar(79),@P9 nvarchar(1),@P10 nvarchar(1),@P11 nvarchar(1),@P12 nvarchar(1),@P13 nvarchar(20),@P14 nvarchar(50),@P15 datetime,@P16 nvarchar(60),@P17 nvarchar(60),@P18 nvarchar(60),@P19 nvarchar(60),@P20 nvarchar(60)',N'DEFAULT',N'm_ntf_notification',N'Notification - Notification',N'M',N'MBL',N'(Default)',NULL,N'34',N'0',N'0',N'0',N'0',N'M',N'admin','2021-10-26 10:07:24.460','Notification',NULL,NULL,NULL,NULL
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admin' , GetDate() From cf_menu_template 