Solved

converting autonum from Ms Access

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

Independent Software Vendors: 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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

627 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