Solved

converting autonum from Ms Access

Posted on 2004-04-25
3
269 Views
Last Modified: 2010-08-05
hi all,
i m doing database migration from Ms Access to SQL Server 2000.but there is a field of a table in Ms Access that i use autonum. when i do import data in SQL Server that field become int in SQL Server.

now i want to change to some sort of autonum in sql server but i couldn't find it. wat else data type i can use to hav auto increment feature?is it available in sql server?

daniel
0
Comment
Question by:daniellyh
  • 2
3 Comments
 
LVL 6

Expert Comment

by:robertjbarker
ID: 10915075
You would use identity(n,1) on the column that was autonum.
0
 
LVL 6

Accepted Solution

by:
robertjbarker earned 30 total points
ID: 10915117
When you define the SQL Server target table the column corresponding to the autonum column would be defined using identity:

create table a (ii int identity(1,1))

When you are transferring the data from access to SQL Server you need to use:

SET IDENTITY_INSERT a ON

If you are using DTS in Enterprise Manager, there is a checkbox corresponding to this SET statement.
0
 
LVL 1

Author Comment

by:daniellyh
ID: 10915166
hi robertjbarker,
thx for prompt reply n accurate ans.

daniel
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now