DELETE FROM PARTY_CONTACT WHERE PARTY_CONTACT.OJB_CONCRETE_CLASS LIKE '%.contacts.Phone' AND PARTY_CONTACT.TYPE = 'WORK';

SELECT 
CONCAT('INSERT INTO PARTY_CONTACT (KEY_ROOT_DOMAIN_OBJECT, OJB_CONCRETE_CLASS, VISIBLE, DEFAULT_CONTACT, TYPE, KEY_PARTY, NUMBER) VALUES (1, "net.sourceforge.fenixedu.domain.contacts.Phone", 1, 0, "WORK", ', PARTY.ID_INTERNAL, ', "', PARTY.WORK_PHONE, '");') AS ""
FROM PARTY WHERE PARTY.WORK_PHONE IS NOT NULL AND PARTY.WORK_PHONE REGEXP '[0-9]+';