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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 create a supplier

Author  Topic 

juantrix
Starting Member

2 Posts

Posted - 2009-06-04 : 16:38:42
hi

i 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 example
SET IDENTITY_INSERT MyTable ON

INSERT MyTable ....

SET IDENTITY_INSERT OFF
Go to Top of Page

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.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-04 : 17:10:11
The story is going on here: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=127085


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -