I'm trying to delete all patients from an OPenMRS instance and I've deleted everything but the persons table. However, when I try this
delete from person where person_id not in (select user_id from users); I get the following ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`openmrs/users`, CONSTRAINT `person_id_for_user` FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`)) How can this be if I specifically tell it not to include anyone in the users table? What should I be using to delete all persons not included in users? Thanks, Joaquín ___________________________________________________________________ Gerente de Desarrollo, eHealth Systems <http://www.ehs.cl/> Research Fellow, Escuela de Medicina de Harvard <http://hms.harvard.edu/> Moderador, GHDOnline.org <http://www.ghdonline.org/> _________________________________________ To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-implement-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

