Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dbserver2000
Starting Member
47 Posts |
Posted - 2009-02-25 : 21:59:34
|
| this is the Error message:Msg 102, Level 15, State 1, Line 5This is the T-SQLUSE Master;GOCREATE DATABASE Tester;GOUSE TesterGOCREATE TABLE dbo.Roles( RoleID int NOT NULL, RoleName varchar (15) NULL, CONSTRAINT PK_RoleID PRIMARY KEY (RoleID))GOCREATE TABLE dbo.Person( PersonID int NOT NULL, LastName varchar (15) NULL, FirstName varchar (15) NULL, RoleID int NULL references dbo.Roles CONSTRAINT PK_PersonID PRIMARY KEY (PersonID))GOCREATE TABLE dbo.Category( CategoryID int NOT NULL, Category varchar (30) NULL, CONSTRAINT PK_CategoryID PRIMARY KEY (CategoryID))GO CREATE TABLE dbo.Tests( TestID int NOT NULL, TestName varchar (30) NULL, CategoryID int NULL references dbo.category CONSTRAINT PK_TestID PRIMARY KEY (TestID))GOCREATE TABLE dbo.question( QuestionID int NOT NULL, QuestionText varchar (200) NULL, Explanation varchar (300) NULL, Reference varchar (200) NULL, TestID int NULL references dbo.Tests CONSTRAINT PK_QuestionID PRIMARY KEY (QuestionID))GOCREATE TABLE dbo.Answer( AnswerID int NOT NULL, AnswerText varchar (300) NULL, CorrectAnswer bit NULL, QuestionID int NOT NULL references dbo.question CONSTRAINT PK_AnswerID PRIMARY KEY (AnswerID))GO CREATE TABLE dbo.TestHistory( TestHistoryID int NOT NULL, PersonID int NULL references dbo.Person TestID int NULL references dbo.Tests DateTaken datetime NULL, Score decimal(4,2) NULL CONSTRAINT PK_TestHistoryID PRIMARY KEY (TestHistoryID))GOnow what does Msg 102, Level 15, State 1, Line 5 means?102 refers to what?what is level 15?State 1?Line 5 is which one?Thanks for your help |
|
|
Mangal Pardeshi
Posting Yak Master
110 Posts |
Posted - 2009-02-25 : 23:21:44
|
I'm not sure what exactly those error code means. But here is the problem, you missed 2 commas after after PersonId and testId columns.CREATE TABLE dbo.TestHistory(TestHistoryID int NOT NULL,PersonID int NULL references dbo.Person,TestID int NULL references dbo.Tests,DateTaken datetime NULL,Score decimal(4,2) NULLCONSTRAINT PK_TestHistoryID PRIMARY KEY (TestHistoryID))GO Mangal Pardeshihttp://mangalpardeshi.blogspot.com |
 |
|
|
dbserver2000
Starting Member
47 Posts |
Posted - 2009-02-25 : 23:33:14
|
| Yep I noticed that.Thanks a lot |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-25 : 23:41:25
|
| don't post duplicate post u have already posted in new to sql |
 |
|
|
dbserver2000
Starting Member
47 Posts |
Posted - 2009-02-26 : 00:00:17
|
Me?Where is double post?Who R U?quote: Originally posted by bklr don't post duplicate post u have already posted in new to sql
|
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2009-02-26 : 00:04:54
|
quote: Originally posted by bklr don't post duplicate post u have already posted in new to sql
He first posted in transact sql later he posted the same question in new to sql |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-26 : 00:14:29
|
quote: Originally posted by dbserver2000 Me?Where is double post?Who R U?quote: Originally posted by bklr don't post duplicate post u have already posted in new to sql
who posted this one please check this link........http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=120583 |
 |
|
|
dbserver2000
Starting Member
47 Posts |
Posted - 2009-02-26 : 00:18:41
|
Can we more professional in the approach !And please sir, identify who are you?Thank you.quote: Originally posted by bklr
quote: Originally posted by dbserver2000 Me?Where is double post?Who R U?quote: Originally posted by bklr don't post duplicate post u have already posted in new to sql
who posted this one please check this link........http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=120583
|
 |
|
|
|
|
|
|
|