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 |
|
baburk
Posting Yak Master
108 Posts |
Posted - 2009-03-20 : 06:58:38
|
| Hi,I am creating my own IdentityValue like b1, b2,..I truncated the table TestTruncate table dbo.TestSELECT 'b'+ CONVERT(VARCHAR, (IDENT_CURRENT ('dbo.Test'))) AS Current_Identity;GOb1before Insert.After record inserted,Next Time also I got the same valueb1. So I got PrimaryKey Exception.How can I able to create It.Is there is any better way.Thanks. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-03-20 : 09:46:20
|
| http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57069MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-20 : 09:51:23
|
| how did it cause pk violation? if you truncate table, there wont be any data. then in subsequent insert how will pk violate? |
 |
|
|
|
|
|