i am trying to create a table in mssql with an ID like this PIWC/ATOM/VISIT/000001
I tried but get the error "Msg 207, Level 16, State 1, Line 5 Invalid column name 'Visitorid'"
this is the code please help me out
raiserror('creating Visitors table....',0,1)
CREATE TABLE tblVisitors
(Visitorsid int IDENTITY(1,1) NOT NULL,
FormattedVisitorid AS ('PIWC/ATOM/VISIT/' + RIGHT ('000000' + CAST(Visitorid AS VARCHAR(6)),6)),
Visitdate datetime,
Assemblys varchar(30)not null,
Surname varchar(100)not null,
Othername varchar(100)not null,
Gender varchar(10),
Telephone varchar(50),
Residentialaddress varchar(300),
Visiting varchar(300),
Membership varchar(100),
Acceptjesus varchar(200),
Others varchar(550))