March 14, 2008 at 3:58 am
hi , how can i delete duplicate records in two tables...
March 14, 2008 at 4:17 am
Please send sample table schemas, sample data and desired result. You must agree that there is no precise answer to your question.
Piotr
...and your only reply is slàinte mhath
March 14, 2008 at 5:51 am
how can i delete duplicate records in a table
March 14, 2008 at 5:55 am
Yes you can remove duplicate record by three ways:
1. group by using row_number()
2. drived table using row_number()
3. having class with count function
for more detail see help or sent me your problem code for answer
Shamas Saeed
Pakistan
March 14, 2008 at 6:41 am
Also, do a search in the Scripts [/url]section here in SSC. You'll find all kinds of examples for doing what you need.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 22, 2011 at 11:54 pm
:-)with deldup as(select_rownumber()over(partition by(empide) group by(empid)
))as da from emp wher 1=1
delete from deldup where da>1
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply