cust_id trans_dt a0001 12/05/2005 a0002 12/05/2005 a0001 12/05/2005The 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?
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
- SELECT DISTINCT cust_id, trans_dt INTO temp_tbl FROM customertrans
- TRUNCATE TABLE customertrans
- INSERT INTO customertrans SELECT * FROM temp_tbl
Do you have comments on this Ask the Expert Q&A? Let us know.
Dig Deeper on SQL Server Database Modeling and Design
Related Q&A from Kevin Kline
Monitoring and Administration expert Kevin Kline discusses the obstacles of database administration when a publisher resides on a different domain.continue reading
A common SQL Mail error is addressed by monitoring and administration expert Kevin Kline.continue reading
Monitoring and Administration expert Kevin Kline discusses the installation of SQL Server client tools on Windows XP Pro.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.