ALTER TABLE `proll_reference_data`
	ADD COLUMN `flag` INT(1) NULL DEFAULT NULL AFTER `status`;

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Expense_Type' LIMIT 1), 
NULL, 'Self', 1, 1, 0,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Expense_Type' LIMIT 1), 
NULL, 'Shared', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Expense_Frequency' LIMIT 1), 
NULL, 'One Day', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Expense_Frequency' LIMIT 1), 
NULL, 'Daily', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Expense_Frequency' LIMIT 1), 
NULL, 'Reimbursement', 1, 1, 0,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Company', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Market', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Cluster', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Sub-Cluster', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Country', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'State', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'City', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Geographical_Filter' LIMIT 1), 
NULL, 'Branch', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Transport_Arrangement' LIMIT 1), 
NULL, 'Not Specified', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Travel_Scope' LIMIT 1), 
NULL, 'Transfer', 1, 1, 0,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO `proll_reference_data` (`cid`, `ref_id`, `reference_key`, `description`, `sort_order`, 
`status`, `flag`,`created_by`, `created_date`, `modified_by`, `modified_date`, `reference_data_id`, `emportal`, 
`lmportal`, `hrportal`, `allow_edit`, `allow_delete`, `system_ind`, `allow_add`) 
VALUES (48, (SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Accomodation_Arrangement' LIMIT 1), 
NULL, 'Not Specified', 1, 1, 1,48, '2020-05-19 00:00:00', NULL, NULL, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL);

UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Accomodation_Arrangement' LIMIT 1) AND `description` = 'Self';
UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Accomodation_Arrangement' LIMIT 1) AND `description` = 'Company';
UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Transport_Arrangement' LIMIT 1) AND `description` = 'Self';
UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Transport_Arrangement' LIMIT 1) AND `description` = 'Company';
UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Travel_Scope' LIMIT 1) AND `description` = 'Domestic';
UPDATE `proll_reference_data` SET `flag`='0' WHERE `ref_id`=(SELECT `ref_id` FROM `proll_reference_data_code` WHERE `reference_code` = 'Travel_Scope' LIMIT 1) AND `description` = 'International';

