Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

converting autonum from Ms Access

Posted on 2004-04-25
3
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 120 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

715 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