
UPDATE resource_sub1 SET last_invoice_id_c=0 WHERE last_invoice_id_c IS NULL ;
UPDATE resource_sub1 SET last_teacher_id_c=90000 WHERE last_teacher_id_c IS NULL ;
UPDATE resource_sub1 SET last_student_id_c=0 WHERE last_student_id_c IS NULL ;

-- 2014-04-01 gakunen updates

SELECT id, last_name, date_modified, grade, grade_entrance_date, grade_entered, date_modified, date_entered, contact_status FROM contacts WHERE smsgroup='student' AND grade  IN ("00", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17") 

UPDATE contacts SET grade="general" WHERE smsgroup='student' AND grade ="17"
UPDATE contacts SET grade=grade+1 WHERE smsgroup='student' AND grade  IN ("00", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16") 

