Solved

Populate SQL table.field with incremental value for unique ID

Posted on 2004-08-19
4
540 Views
Last Modified: 2006-11-17
Hi

I have imported a view from an Oracle database via ODBC driver(Executed via scheduled DTS).  However, I need to insert a key field so I can create an index, then link it to an MS Access interface.  I have added the new field to the imported table (i.e. REPORTS_V_CHK_VW_HOURS).  So what I would like to do know is populate the field with an incremental value (i.e. 1, 2, 3, 4, etc.), so each field is uniquely identified.

I am pretty new to MS SQL and eager to learn.  Help is very much appreciated.  

Thank you in advance

RD
0
Comment
Question by:Russell_Derouin
[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
4 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 11843533
You can do that, by setting the IDENTITY attribute.
0
 

Author Comment

by:Russell_Derouin
ID: 11845516
Hi,

Thanks for the info, but I thought and tried that. I solved my own problem getting means to rebuild the Oracle view (root of my problem).  The view was created incorrectly; hence, duplicate records.  Once the duplicate records are removed, I will be able to apply the Identity attribute from MS SQL.

Thanks for the feedback
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 12142700
Submitted to PAQ with points refunded (75)

DarthMod
Community Support Moderator
0

Featured Post

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

617 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