Home > Ask the SQL Server Experts > Kevin Kline - Monitoring/Administration Questions & Answers > Identifier field in Microsoft's SQL Server
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Identifier field in Microsoft's SQL Server

Kevin Kline EXPERT RESPONSE FROM: Kevin Kline

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 25 October 2005
I have a table similar to this:
 cust_id     trans_dt
  a0001      12/05/2005
  a0002      12/05/2005
  a0001      12/05/2005
The table does not have a ROWID or identifier field. I would like to delete the duplicate records and have the results formatted like this:
 a0001     12/05/2005
 a0002     12/05/2005
-----------------------
In Oracle there is ROWID to solve this problem. Is there a way to resolve this in SQL Server?

>
There are a couple ways to accomplish this task. Just because I like fast transactions, I would probably do something like this:

  1. SELECT DISTINCT cust_id, trans_dt INTO temp_tbl FROM customertrans
  2. TRUNCATE TABLE customertrans
  3. INSERT INTO customertrans SELECT * FROM temp_tbl


Do you have comments on this Ask the Expert Q&A? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Kevin Kline - Monitoring/Administration
Publisher residing on a different domain
SQL Mail troubleshooting
Installing SQL Server client tools on Windows XP Pro
Incorrect drive letter assignments
Installing SQL Server 2000 Enterprise Edition on Windows XP
Getting scheduled DTS packages to run
Performance problems after installing Windows Service Pack 4
Improve performance by spreading data
Difficulties transferring stored procedures and triggers
Shrinking database and log files

SQL Server Interoperability
Utilize SSAS for data predictions and classification using Excel
How to create a SQL Server linked server to DB2
Export SQL Server data to an Excel file using SSIS and Visual Studio
Performance tuning for SQL Server 2005 and Exchange running on SBS
Custom VB.Net scripting in SQL Server Integration Services
Can SQL Server 2000 work on Windows 2003 platform?
Query to search text in old DTS packages in SQL Server?
Handle slowly changing dimensions with SSIS 2005 wizard
Run DTS packages within SQL Server Integration Services
SQL Server Integration Services how-to

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
CORBA  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts