I am dump the database nightly for backup purposes using mysqldump. It generates the file which contains the statements to build several tables and the insert statements to populate.
However, there are two Create table statements that have invalid syntax. How can this be if MySQL is the one writing the syntax? Below is one of the Create table statements.
Any suggestions would be appreciated.
-- MySQL dump 9.07
--
-- Host: localhost Database: chartnote
---------------------------------------------------------
-- Server version 4.0.12-nt-log
CREATE TABLE tblmain (
id int(11) NOT NULL auto_increment,
Doctor varchar(50) default NULL,
PtName varchar(50) default NULL,
ptFirstName varchar(50) default NULL,
PTDOB varchar(50) default NULL,
PtDate date default NULL,
PtPrimaryDX varchar(50) default NULL,
PtDateDX varchar(50) default NULL,
PtMedsReviewed tinyint(1) default NULL,
PtRefillsNeeded varchar(255) default NULL,
PtrefillCheck tinyint(1) default NULL,
Progress varchar(255) default NULL,
PtHistory longtext,
PtHistory2 longtext,
Phys_Ht varchar(50) default NULL,
Phys_Wt varchar(50) default NULL,
Phys_Temp varchar(50) default NULL,
Phys_BP varchar(50) default NULL,
Phys_P varchar(50) default NULL,
Phys_R varchar(50) default NULL,
PtNumber varchar(50) default NULL,
Gen_WNL tinyint(1) default NULL,
Gen_Cachectic tinyint(1) default NULL,
Gen_Cushingoid tinyint(1) default NULL,
Gen_Dishevled tinyint(1) default NULL,
Gen_Disoriented tinyint(1) default NULL,
Gen_Anxious tinyint(1) default NULL,
Gen_Depressed tinyint(1) default NULL,
Gen_Blunted tinyint(1) default NULL,
Skin_WNL tinyint(1) default NULL,
Skin_Pale tinyint(1) default NULL,
Skin_Alopecia tinyint(1) default NULL,
Skin_Rash tinyint(1) default NULL,
Skin_Psoriasis tinyint(1) default NULL,
Skin_DigUlcers tinyint(1) default NULL,
Skin_Periungal tinyint(1) default NULL,
Skin_Purpura tinyint(1) default NULL,
Skin_Varicosities tinyint(1) default NULL,
Skin_Scleroderma tinyint(1) default NULL,
Skin_Nodules tinyint(1) default NULL,
Skin_Tophi tinyint(1) default NULL,
EENT_WNL tinyint(1) default NULL,
EENT_PupilDefect tinyint(1) default NULL,
EENT_Cataracts tinyint(1) default NULL,
EENT_Conjunctivitus tinyint(1) default NULL,
EENT_OralInflam tinyint(1) default NULL,
EENT_OralUlcers tinyint(1) default NULL,
EENT_Parotid tinyint(1) default NULL,
EENT_Thyromeg tinyint(1) default NULL,
EENT_Lymphadenopathy tinyint(1) default NULL,
XRAYS_Chest_WNL tinyint(1) default NULL,
XRAYS_Chest_Rales tinyint(1) default NULL,
XRAYS_Chest_Wheezing tinyint(1) default NULL,
XRAYS_Chest_Dullness tinyint(1) default NULL,
XRAYS_Chest_Rhonchi tinyint(1) default NULL,
XRAYS_Cardio_WNL tinyint(1) default NULL,
XRAYS_Cardio_Murmer tinyint(1) default NULL,
XRAYS_Cardio_Rub tinyint(1) default NULL,
XRAYS_Cardio_Edema tinyint(1) default NULL,
XRAYS_Cardio_Arrythmia tinyint(1) default NULL,
XRAYS_Vascular_WNL tinyint(1) default NULL,
XRAYS_Vascular_DigCyanosis tinyint(1) default NULL,
XRAYS_Vascular_Temporal tinyint(1) default NULL,
XRAYS_Vascular_AbsentPulse tinyint(1) default NULL,
XRAYS_Vascular_DecCapRefill tinyint(1) default NULL,
Labs_SeeChart tinyint(1) default NULL,
Labs_CBC tinyint(1) default NULL,
Labs_CMP tinyint(1) default NULL,
Labs_UA tinyint(1) default NULL,
Labs_DNA tinyint(1) default NULL,
Labs_ANA tinyint(1) default NULL,
Labs_RF tinyint(1) default NULL,
Labs_HLAB27 tinyint(1) default NULL,
Labs_ESR tinyint(1) default NULL,
Labs_CREAT tinyint(1) default NULL,
Labs_TSH tinyint(1) default NULL,
Labs_C3 tinyint(1) default NULL,
Labs_ANAPanel tinyint(1) default NULL,
Labs_AntiCCP tinyint(1) default NULL,
Labs_CRP tinyint(1) default NULL,
Labs_LFTs tinyint(1) default NULL,
Labs_T4 tinyint(1) default NULL,
Labs_C4 tinyint(1) default NULL,
Labs_Uric Acid tinyint(1) default NULL,
Labs_SGOT tinyint(1) default NULL,
Labs_Other varchar(255) default NULL,
Labs_XRAY varchar(255) default NULL,
Labs_CPK tinyint(1) default NULL,
LAbs_Procedures varchar(255) default NULL,
PROC_Abdomen_WNL tinyint(1) default NULL,
PROC_Abdomen_Tender tinyint(1) default NULL,
PROC_Abdomen_Hepatomegaly tinyint(1) default NULL,
PROC_Abdomen_Splenomegaly tinyint(1) default NULL,
PROC_Genitalia_WNL tinyint(1) default NULL,
PROC_Genitalia_Ulceration tinyint(1) default NULL,
PROC_Genitalia_Discharge tinyint(1) default NULL,
PROC_Muscles_WNL tinyint(1) default NULL,
PROC_Muscles_Tender tinyint(1) default NULL,
PROC_MusclesTender tinyint(1) default NULL,
PROC_Muscles_FMS_Tender_value varchar(50) default NULL,
PROC_Muscles_Proximal tinyint(1) default NULL,
PROC_Muscles_Distal tinyint(1) default NULL,
PROC_Muscles_Atrophy tinyint(1) default NULL,
PROC_Neuro_WNL tinyint(1) default NULL,
PROC_Neuro_CNII tinyint(1) default NULL,
PROC_Neuro_DTRS tinyint(1) default NULL,
PROC_Neuro_Motor tinyint(1) default NULL,
PROC_Neuro_Sensory tinyint(1) default NULL,
Plan_1 varchar(120) default NULL,
Plan_2 varchar(120) default NULL,
Plan_3 varchar(120) default NULL,
Plan_4 varchar(120) default NULL,
Plan_5 varchar(120) default NULL,
Plan_6 varchar(120) default NULL,
Asses1 varchar(255) default NULL,
Asses2 varchar(255) default NULL,
Asses3 varchar(255) default NULL,
Asses4 varchar(255) default NULL,
Asses5 varchar(255) default NULL,
Asses6 varchar(255) default NULL,
Follow_Up_NurseDays tinyint(1) default NULL,
NurseDays varchar(50) default NULL,
NurseWeeks varchar(50) default NULL,
NurseMonths varchar(50) default NULL,
Follow_Up_OfficeDays tinyint(1) default NULL,
OfficeDays varchar(50) default NULL,
OfficeWeeks varchar(50) default NULL,
OfficeMonths varchar(50) default NULL,
Send_To varchar(255) default NULL,
NotesGEN varchar(30) default NULL,
NotesEENT varchar(30) default NULL,
NotesChest varchar(30) default NULL,
NotesCardio varchar(30) default NULL,
NotesVascular varchar(30) default NULL,
NotesAbdomen varchar(30) default NULL,
NotesGenetalia varchar(30) default NULL,
NotesMuscles varchar(30) default NULL,
NotesNeuro varchar(30) default NULL,
NotesSkin varchar(30) default NULL,
PhysiclNotes varchar(255) default NULL,
JulieBarnes tinyint(1) default NULL,
MedContract tinyint(1) default NULL,
UNIQUE KEY id (id)
) TYPE=MyISAM;
However, there are two Create table statements that have invalid syntax. How can this be if MySQL is the one writing the syntax? Below is one of the Create table statements.
Any suggestions would be appreciated.
-- MySQL dump 9.07
--
-- Host: localhost Database: chartnote
---------------------------------------------------------
-- Server version 4.0.12-nt-log
CREATE TABLE tblmain (
id int(11) NOT NULL auto_increment,
Doctor varchar(50) default NULL,
PtName varchar(50) default NULL,
ptFirstName varchar(50) default NULL,
PTDOB varchar(50) default NULL,
PtDate date default NULL,
PtPrimaryDX varchar(50) default NULL,
PtDateDX varchar(50) default NULL,
PtMedsReviewed tinyint(1) default NULL,
PtRefillsNeeded varchar(255) default NULL,
PtrefillCheck tinyint(1) default NULL,
Progress varchar(255) default NULL,
PtHistory longtext,
PtHistory2 longtext,
Phys_Ht varchar(50) default NULL,
Phys_Wt varchar(50) default NULL,
Phys_Temp varchar(50) default NULL,
Phys_BP varchar(50) default NULL,
Phys_P varchar(50) default NULL,
Phys_R varchar(50) default NULL,
PtNumber varchar(50) default NULL,
Gen_WNL tinyint(1) default NULL,
Gen_Cachectic tinyint(1) default NULL,
Gen_Cushingoid tinyint(1) default NULL,
Gen_Dishevled tinyint(1) default NULL,
Gen_Disoriented tinyint(1) default NULL,
Gen_Anxious tinyint(1) default NULL,
Gen_Depressed tinyint(1) default NULL,
Gen_Blunted tinyint(1) default NULL,
Skin_WNL tinyint(1) default NULL,
Skin_Pale tinyint(1) default NULL,
Skin_Alopecia tinyint(1) default NULL,
Skin_Rash tinyint(1) default NULL,
Skin_Psoriasis tinyint(1) default NULL,
Skin_DigUlcers tinyint(1) default NULL,
Skin_Periungal tinyint(1) default NULL,
Skin_Purpura tinyint(1) default NULL,
Skin_Varicosities tinyint(1) default NULL,
Skin_Scleroderma tinyint(1) default NULL,
Skin_Nodules tinyint(1) default NULL,
Skin_Tophi tinyint(1) default NULL,
EENT_WNL tinyint(1) default NULL,
EENT_PupilDefect tinyint(1) default NULL,
EENT_Cataracts tinyint(1) default NULL,
EENT_Conjunctivitus tinyint(1) default NULL,
EENT_OralInflam tinyint(1) default NULL,
EENT_OralUlcers tinyint(1) default NULL,
EENT_Parotid tinyint(1) default NULL,
EENT_Thyromeg tinyint(1) default NULL,
EENT_Lymphadenopathy tinyint(1) default NULL,
XRAYS_Chest_WNL tinyint(1) default NULL,
XRAYS_Chest_Rales tinyint(1) default NULL,
XRAYS_Chest_Wheezing tinyint(1) default NULL,
XRAYS_Chest_Dullness tinyint(1) default NULL,
XRAYS_Chest_Rhonchi tinyint(1) default NULL,
XRAYS_Cardio_WNL tinyint(1) default NULL,
XRAYS_Cardio_Murmer tinyint(1) default NULL,
XRAYS_Cardio_Rub tinyint(1) default NULL,
XRAYS_Cardio_Edema tinyint(1) default NULL,
XRAYS_Cardio_Arrythmia tinyint(1) default NULL,
XRAYS_Vascular_WNL tinyint(1) default NULL,
XRAYS_Vascular_DigCyanosis tinyint(1) default NULL,
XRAYS_Vascular_Temporal tinyint(1) default NULL,
XRAYS_Vascular_AbsentPulse tinyint(1) default NULL,
XRAYS_Vascular_DecCapRefill tinyint(1) default NULL,
Labs_SeeChart tinyint(1) default NULL,
Labs_CBC tinyint(1) default NULL,
Labs_CMP tinyint(1) default NULL,
Labs_UA tinyint(1) default NULL,
Labs_DNA tinyint(1) default NULL,
Labs_ANA tinyint(1) default NULL,
Labs_RF tinyint(1) default NULL,
Labs_HLAB27 tinyint(1) default NULL,
Labs_ESR tinyint(1) default NULL,
Labs_CREAT tinyint(1) default NULL,
Labs_TSH tinyint(1) default NULL,
Labs_C3 tinyint(1) default NULL,
Labs_ANAPanel tinyint(1) default NULL,
Labs_AntiCCP tinyint(1) default NULL,
Labs_CRP tinyint(1) default NULL,
Labs_LFTs tinyint(1) default NULL,
Labs_T4 tinyint(1) default NULL,
Labs_C4 tinyint(1) default NULL,
Labs_Uric Acid tinyint(1) default NULL,
Labs_SGOT tinyint(1) default NULL,
Labs_Other varchar(255) default NULL,
Labs_XRAY varchar(255) default NULL,
Labs_CPK tinyint(1) default NULL,
LAbs_Procedures varchar(255) default NULL,
PROC_Abdomen_WNL tinyint(1) default NULL,
PROC_Abdomen_Tender tinyint(1) default NULL,
PROC_Abdomen_Hepatomegaly tinyint(1) default NULL,
PROC_Abdomen_Splenomegaly tinyint(1) default NULL,
PROC_Genitalia_WNL tinyint(1) default NULL,
PROC_Genitalia_Ulceration tinyint(1) default NULL,
PROC_Genitalia_Discharge tinyint(1) default NULL,
PROC_Muscles_WNL tinyint(1) default NULL,
PROC_Muscles_Tender tinyint(1) default NULL,
PROC_MusclesTender tinyint(1) default NULL,
PROC_Muscles_FMS_Tender_value varchar(50) default NULL,
PROC_Muscles_Proximal tinyint(1) default NULL,
PROC_Muscles_Distal tinyint(1) default NULL,
PROC_Muscles_Atrophy tinyint(1) default NULL,
PROC_Neuro_WNL tinyint(1) default NULL,
PROC_Neuro_CNII tinyint(1) default NULL,
PROC_Neuro_DTRS tinyint(1) default NULL,
PROC_Neuro_Motor tinyint(1) default NULL,
PROC_Neuro_Sensory tinyint(1) default NULL,
Plan_1 varchar(120) default NULL,
Plan_2 varchar(120) default NULL,
Plan_3 varchar(120) default NULL,
Plan_4 varchar(120) default NULL,
Plan_5 varchar(120) default NULL,
Plan_6 varchar(120) default NULL,
Asses1 varchar(255) default NULL,
Asses2 varchar(255) default NULL,
Asses3 varchar(255) default NULL,
Asses4 varchar(255) default NULL,
Asses5 varchar(255) default NULL,
Asses6 varchar(255) default NULL,
Follow_Up_NurseDays tinyint(1) default NULL,
NurseDays varchar(50) default NULL,
NurseWeeks varchar(50) default NULL,
NurseMonths varchar(50) default NULL,
Follow_Up_OfficeDays tinyint(1) default NULL,
OfficeDays varchar(50) default NULL,
OfficeWeeks varchar(50) default NULL,
OfficeMonths varchar(50) default NULL,
Send_To varchar(255) default NULL,
NotesGEN varchar(30) default NULL,
NotesEENT varchar(30) default NULL,
NotesChest varchar(30) default NULL,
NotesCardio varchar(30) default NULL,
NotesVascular varchar(30) default NULL,
NotesAbdomen varchar(30) default NULL,
NotesGenetalia varchar(30) default NULL,
NotesMuscles varchar(30) default NULL,
NotesNeuro varchar(30) default NULL,
NotesSkin varchar(30) default NULL,
PhysiclNotes varchar(255) default NULL,
JulieBarnes tinyint(1) default NULL,
MedContract tinyint(1) default NULL,
UNIQUE KEY id (id)
) TYPE=MyISAM;