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 |
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2006-12-04 : 05:20:06
|
I am trying to create a table with a numeric identity but generate the following error:Msg 8183, Level 16, State 1, only UNIQUE or PRIMARY KEY constraints can be created on computed columns, while CHECK, FOREIGN, and NOT NULL constraints require that computer columns be persisted My T-SQL Statement (in SQL server 2005)Select Numeric Identity(1,1) as SRN, a.Creditor_Ref, b.Vendor_Nameinto testfrom table1 a join table2 bon a.Creditor_Ref = b.RefAny ideas...? Possibly incorrect syntax..?Many thanks!!!Dave |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-04 : 05:24:01
|
Select Identity(int,1,1) as SRN,a.Creditor_Ref,b.Vendor_Nameinto testfrom table1 a join table2 bon a.Creditor_Ref = b.RefPeter LarssonHelsingborg, Sweden |
 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2006-12-04 : 06:34:00
|
Thanks! Works great |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-04 : 09:29:55
|
Read about IDENTITY function in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|