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 |
|
juantrix
Starting Member
2 Posts |
Posted - 2009-06-04 : 16:38:42
|
| hii have a database and i am new to the job no other to help one of the users supervisor erased a supplier and due to a primary key and unique constrain or number it can not be created again how can i do it so i can recreate the supplier with the same number so i can transfer the invoices and close the account.best regards,jnc |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2009-06-04 : 16:57:32
|
Do you mean it was an IDENTITY column? if so check out BOL for the SET IDENTITY_INSERT statement. For exampleSET IDENTITY_INSERT MyTable ONINSERT MyTable ....SET IDENTITY_INSERT OFF |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-04 : 17:01:14
|
Without any knowing about the tables structure and relations there is no way to help from outside I think. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
|
|
|
|