UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 741474 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 741474 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 886479 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 886479 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 317112 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 317112 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 857930 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 857930 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 794192 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 794192 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 725676 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 725676 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 812953 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 812953 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 194205 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 194205 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 151154 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 151154 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 732447 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 732447 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 198976 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 198976 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 205128 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 205128 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 823547 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 823547 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 693460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 693460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 693461 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 693461 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 270966 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 270966 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 216412 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 216412 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738638 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738638 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 137031 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 137031 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 850759 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 850759 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 123834 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 123834 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 850992 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 850992 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 160579 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 160579 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738639 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738639 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001192 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001192 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 423328 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 423328 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 117983 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 117983 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 259832 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 259832 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001372 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001372 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 861301 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 861301 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 604325 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 604325 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 185815 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 185815 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001223 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001223 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 100140 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 100140 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 142040 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 142040 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001107 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001107 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 102977 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 102977 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 699110 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 699110 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 560953 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 560953 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 130438 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 130438 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 145408 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 145408 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738637 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738637 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 404749 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 404749 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 802618 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 802618 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 960244 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 960244 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 631042 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 631042 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 179156 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 179156 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 664496 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 664496 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 284695 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 284695 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 100628 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 100628 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 362210 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 362210 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 245636 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 245636 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 249954 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 249954 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 104009 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 104009 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 184883 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 184883 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 718651 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 718651 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344374 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344374 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 242515 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 242515 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 684383 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 684383 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 995718 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 995718 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 156956 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 156956 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 473503 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 473503 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 858846 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 858846 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 301517 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 301517 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 647975 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 647975 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 682145 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 682145 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 106503 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 106503 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 754548 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 754548 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 578836 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 578836 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 851552 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 851552 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 176015 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 176015 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001458 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001458 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 145750 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 145750 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 952668 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 952668 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 211970 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 211970 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 604399 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 604399 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 739324 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 739324 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344353 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344353 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 815186 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 815186 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852475 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852475 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 316214 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 316214 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 247257 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 247257 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 331264 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 331264 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 107742 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 107742 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 128738 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 128738 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 198284 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 198284 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 190599 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 190599 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 104444 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 104444 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 105508 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 105508 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 113460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 113460 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 117852 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 117852 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 128336 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 128336 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 129423 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 129423 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 129798 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 129798 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 134017 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 134017 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 136598 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 136598 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 136884 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 136884 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 146252 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 146252 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 152356 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 152356 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 154922 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 154922 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 155844 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 155844 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 160145 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 160145 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 174722 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 174722 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 176688 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 176688 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 188300 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 188300 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 191202 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 191202 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 195422 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 195422 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 204903 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 204903 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 208126 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 208126 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 209458 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 209458 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 210758 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 210758 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 210759 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 210759 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 211971 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 211971 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 255001 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 255001 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 261437 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 261437 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 270383 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 270383 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 273157 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 273157 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 297187 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 297187 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 301473 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 301473 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 332764 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 332764 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 340732 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 340732 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344378 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 344378 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 365917 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 365917 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 397706 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 397706 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 456198 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 456198 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 467054 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 467054 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 484129 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 484129 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 520614 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 520614 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 528117 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 528117 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 528152 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 528152 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 530840 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 530840 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 542529 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 542529 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 578884 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 578884 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 600885 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 600885 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 633937 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 633937 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 634506 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 634506 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 641726 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 641726 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 654185 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 654185 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 658915 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 658915 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 659541 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 659541 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 666671 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 666671 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 679106 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 679106 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 684379 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 684379 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 685781 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 685781 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 698750 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 698750 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 698987 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 698987 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 717688 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 717688 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90009' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 725669 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 725669 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738641 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 738641 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 749379 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 749379 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 805467 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 805467 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 828584 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 828584 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852301 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852301 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852946 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 852946 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 859098 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 859098 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 860537 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 860537 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 977968 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 977968 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 982771 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 982771 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001108 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001108 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001451 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001451 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001454 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001454 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '90011' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001500 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 1001500 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 796662 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 796662 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
UPDATE US_COMP_PIC ucp JOIN ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 586690 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input ON ucp.COMP_CODE = data_input.comp_code SET ucp.PIC_UNO = data_input.user_no WHERE data_input.user_no IS NOT NULL AND (ucp.PIC_TYPE_CODE = 'PIC01' OR ucp.PIC_TYPE_CODE = 'PIC02');	INSERT INTO US_COMP_PIC (COMP_CODE, PIC_TYPE_CODE, PIC_UNO) SELECT data_input.comp_code, t.pic_type, data_input.user_no FROM ( SELECT (SELECT VENDOR_COMP_CODE FROM VD_VENDOR_HOTEL_MAPPING WHERE HOTEL_CODE = 586690 AND VENDOR_COMP_CODE LIKE '6%' LIMIT 1) AS comp_code, '116771' AS user_no ) AS data_input JOIN (SELECT 'PIC01' AS pic_type UNION ALL SELECT 'PIC02') t WHERE data_input.user_no IS NOT NULL AND NOT EXISTS (SELECT 1 FROM US_COMP_PIC u WHERE u.COMP_CODE = data_input.comp_code AND u.PIC_TYPE_CODE = t.pic_type);
