Solved

Populate SQL table.field with incremental value for unique ID

Posted on 2004-08-19
4
532 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
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

947 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

20 Experts available now in Live!

Get 1:1 Help Now