tblSectionID was a type-o it should have been tblSectionInfo and here is thta code (tblSectionInfo contains lots of data):CREATE TABLE dbo.tblSectionInfo ( SectionID smallint IDENTITY(0,1) NOT NULL, SectionTitle varchar(250) NOT NULL, ShortName varchar(30) NOT NULL, RouteName varchar(15) NOT NULL, Synopsis varchar(MAX) NOT NULL, SectionType varchar(15) NOT NULL, LogoFileID int NULL, CONSTRAINT PK_SectionInfo_SectionID PRIMARY KEY CLUSTERED (SectionID ASC), CONSTRAINT UC_SectionInfo_RouteName UNIQUE NONCLUSTERED (RouteName ASC), CONSTRAINT FK_SectionInfo_Files FOREIGN KEY (LogoFileID) REFERENCES dbo.tblFiles (FileID) )
tblCharacterInfo contains no data in it (confirmed in Management Studio) and it never has.Modifying the first ALTER statment so SectionID could be NULL causes the same error.If I use code:ALTER TABLE dbo.tblCharacterInfoADD SectionID AS varchar(MAX) NULL
I get error: quote:
Msg 195, Level 15, State 10, Line 2'varchar' is not a recognized built-in function name.