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
 Old Forums
 CLOSED - General SQL Server
 Extremely new at SQL

Author  Topic 

travismp
Starting Member

1 Post

Posted - 2004-08-25 : 12:38:57
I set up a SQL db through enterprise manager, imported table from Access 2000, set up relationships.

I have noticed that the import wizard took my "Auto number" field in Access and changed it to an "int" field. Now it no longer automatically gives each new record a number in order. I stopped at 416. I want to continue with 417, 418, 419, etc...

What do I need to do, and if possible can you please be specific, like I said I am very new here. Thank you all....

Travis Price

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-25 : 12:49:25
Right click on the table in EM, go to design, highlight the int column, look at the bottom of the screen where it says no for identity, change it to yes. Then save and exit.

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-08-25 : 12:57:47
How did you create the table?

You need to ALTER the table and Add IDENTITY

Do you have VISIO 2000 PRO or ERWin?



Brett

8-)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-25 : 13:02:25
You can't just add identity to an existing column that is the PK. You have to create a temporary table that has the identity property, move your data over, then delete your table, then rename the temporary table. For a newbie, that is going to be quite overwhelming to write these scripts to do it outside of EM. Just type in yes for the identity column in EM and save and exit.

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-08-25 : 13:07:00
True...my bad....

My point though, is that the datbase wasn't built correctly in the first place...

Why don't you use DTS and use transfer database task?



Brett

8-)
Go to Top of Page
   

- Advertisement -