This is the code i am typing into Microsft Server Express:-
Create table tblResults (
ResultsId Int NOT NULL,
Grade Varchar(50) NOT NULL,
Competition Char(50),
TeamName Char(50),
Draw Char(20),
Piping_1 Decimal(2,2),
Piping_2 Decimal(2,2),
Ensemble Decimal(2,2),
Drums Decimal(2,2),
Drill Decimal(2,2),
Penalty Decimal(2,2),
Total Decimal(3,2),
Place Double,
TeamId Double NOT NULL,
CompId Double NOT NULL,
JudgeId Double NOT NULL,
GradeId Double NOT NULL,
Primary Key (ResultsId,TeamId,CompId,JudgeId,GradeId)) ENGINE = MyISAM;
Create table tblGrade (
GradeId Double NOT NULL,
Grade Varchar(50),
UNIQUE (GradeId),
Primary Key (GradeId)) ENGINE = MyISAM;
Create table tblCompetition (
CompId Double NOT NULL,
Competition Varchar(50),
Primary Key (CompId)) ENGINE = MyISAM;
Create table tblTeam (
TeamId Double NOT NULL,
TeamName Varchar(50),
TeamOrigin Varchar(50),
GradeEntered Varchar(50),
CompetitionEntered Varchar(50),
Draw Varchar(50),
UNIQUE (TeamName),
Primary Key (TeamId)) ENGINE = MyISAM;
Create table tblJudge (
JudgeId Double NOT NULL,
JudgeName Varchar(50),
JudgeType Varchar(50),
Grade Varchar(50),
Competitions Varchar(50),
GradeId Double NOT NULL,
UNIQUE (JudgeName),
Primary Key (JudgeId,GradeId)) ENGINE = MyISAM;
Alter table tblResults add Foreign Key (CompId) references tblCompetition (CompId) on delete restrict on update restrict;
Alter table tblResults add Foreign Key (TeamId) references tblTeam (TeamId) on delete restrict on update restrict;
Alter table tblResults add Foreign Key (JudgeId,GradeId) references tblJudge (JudgeId,GradeId) on delete restrict on update restrict;
I do not know why when i try and executs this, more errors appear.
Thanks to all who help.







Bookmarks