//tin proti fora eisagogi ton pedion pou tha xrisimopoiithoun os listes ston pinaka katigories insert into katigories (onomasia, id_katigoria) select distinct gp, 109 from patients where gp is not null order by gp //eisagogi apo palia vasi insert into patients (id, address, amka, birthdate, city, comments, email, eth, gp, history, history_drug, lastname, firstname, mobile, parapompi, phone, smoking, tameio, tameio_aeroporia, tk) (select kodikos, odos, amka, imerominia_genisis, poli, sxolia, email, eth, gp, istoriko, istoriko_drug, eponimo, onoma, mobile, parapompi, til, smoking, tameio, tameio_aeroporia, tk from `old-orl`.pelates) //set patients auto_inc ALTER TABLE patients AUTO_INCREMENT=3216; //eisagogi sindedries insert into sinedries (patient_id, sinedriadate, xreosi, priority, evidence, presenting_complaint, diagnosis, treatment, clinical_rinne_r, clinical_rinne_l, clinical_weber, clinical_tymp_r, clinical_otoscopy, clinical_pta, clinical_tonsil_grade, clinical_malampati_grade, clinical_oral_cavity, clinical_endoscopy, clinical_neck, clinical_tymp_l, check_surgery, typos_sinedrias, recipe) (SELECT kod_pelati, imerominia, xreosi, priority, evidence, presenting_complaint, diagnosis, treatment, clinical_rinne_r, clinical_rinne_l, clinical_weber, clinical_tymp_r, clinical_otoscopy, clinical_pta, clinical_tonsil_grade, clinical_malampati_grade, clinical_oral_cavity, clinical_endoscopy, clinical_neck, clinical_tymp_l, check_surgery, typos_sinedrias, recipe from `old-orl`.sinedries) //eisagogi reminders insert INTO `patients_reminders` (patient_id, dateadded, datetoremind, description, comments) (SELECT kod_pelati, imerominia, imerominia_to_remind, perigrafi, comments FROM `old-orl`.pelates_reminders)