![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... |
#3
| |||
| |||
|
|
I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... |
#4
| |||
| |||
|
|
I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
|
hi, Chase Preuninger wrote: I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... this is the italian localized NG for SQL Server, and questions should be posted in italian.. your table is defined with a primary key on the Account_Name column.. primary key implies a unique value and this is the reason you can not insert a duplicate for that column's value.. try defining another primary key instead the actual one.. you could perhaps use an artificial key, perhaps based on a numeric column with an autogenerated value like the Identity property provides.. read further about artificial keys inhttp://www.intelligententerprise.com/showArticle.jhtml?articleID=2018... regards -- Andrea Montanari (Microsoft MVP - SQL Server)http://www.asql.biz http://www.hotelsole.com DbaMgr2k ver 0.21.1 - DbaMgr ver 0.65.1 and further SQL Tools --------- remove DMO to reply |
#9
| |||
| |||
|
|
hi, Chase Preuninger wrote: I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... this is the italian localized NG for SQL Server, and questions should be posted in italian.. your table is defined with a primary key on the Account_Name column.. primary key implies a unique value and this is the reason you can not insert a duplicate for that column's value.. try defining another primary key instead the actual one.. you could perhaps use an artificial key, perhaps based on a numeric column with an autogenerated value like the Identity property provides.. read further about artificial keys inhttp://www.intelligententerprise.com/showArticle.jhtml?articleID=2018... regards -- Andrea Montanari (Microsoft MVP - SQL Server)http://www.asql.biz http://www.hotelsole.com DbaMgr2k ver 0.21.1 - DbaMgr ver 0.65.1 and further SQL Tools --------- remove DMO to reply |
#10
| |||
| |||
|
|
hi, Chase Preuninger wrote: I got it to work but now I can figure out why I can't insert another row referring to chasepreuninger. It works the first time then it just fails. CREATE TABLE Accounts (Account_Name VARCHAR(100) PRIMARY KEY, .... this is the italian localized NG for SQL Server, and questions should be posted in italian.. your table is defined with a primary key on the Account_Name column.. primary key implies a unique value and this is the reason you can not insert a duplicate for that column's value.. try defining another primary key instead the actual one.. you could perhaps use an artificial key, perhaps based on a numeric column with an autogenerated value like the Identity property provides.. read further about artificial keys inhttp://www.intelligententerprise.com/showArticle.jhtml?articleID=2018... regards -- Andrea Montanari (Microsoft MVP - SQL Server)http://www.asql.biz http://www.hotelsole.com DbaMgr2k ver 0.21.1 - DbaMgr ver 0.65.1 and further SQL Tools --------- remove DMO to reply |
![]() |
| Thread Tools | |
| Display Modes | |
| |