Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foriegn Keys

Status
Not open for further replies.

GerryML

Programmer
Feb 20, 2002
8
US
I get this error: Msg 102, Level 15, State 1:
Server 'SYBFAO_TRD2', Line 2:
Incorrect syntax near 'FK_Advisor_Client_Reg_Advisor'.

FOR:

ALTER TABLE dbo.Advisor_Client_Reg ADD
CONSTRAINT "FK_Advisor_Client_Reg_Advisor" FOREIGN KEY("ADVISOR_SEQ_NO")
REFERENCES dbo.Advisor("ADVISOR_SEQ_NO")
GO

help!
 
Remove the quotes from around the constraint name and it should work. Like so...

ALTER TABLE dbo.Advisor_Client_Reg ADD
CONSTRAINT FK_Advisor_Client_Reg_Advisor
FOREIGN KEY("ADVISOR_SEQ_NO")
REFERENCES dbo.Advisor("ADVISOR_SEQ_NO")
GO

Good luck,

Chuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top