Solved

Populate SQL table.field with incremental value for unique ID

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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.
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.

705 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

18 Experts available now in Live!

Get 1:1 Help Now