Solved

converting autonum from Ms Access

Posted on 2004-04-25
3
300 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

792 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