Student Enrolment Delete

Hi,
I have accidentally enrolled students 2 times by using the Data Importer tool. This has meant that students have been enrolled into 2 form groups. Is there any way that i can delete all of the student enrolment without doing them individually.
Thanks

Comments

  • Hi gpsal, sounds like a predicament. Yes it's possible to use an SQL query to remove the imported entries.
     
    DELETE FROM gibbonStudentEnrolment WHERE gibbonSchoolYearID=(SELECT gibbonSchoolYearID FROM gibbonSchoolYear WHERE name='SCHOOL_YEAR_NAME');
    
    This will delete ALL the enrolments for the year specified by name (replace SCHOOL_YEAR_NAME with the one you've imported to), which will clear things out letting you re-import the correct enrolments. If you already had other enrolments before the import mishap then the query will be a bit trickier, let me know if thats the case and I can put together and share a different SQL snippet.

    With any major database change like running a query or import it's best to backup first, either with the snapshot tool in Data Admin or using a mysqldump/mysql export tool (but I've been here too, hindsight is always 20/20 :sweat_smile:).
    admin
  • Great, Thanks i will try this
    admin
Sign In or Register to comment.