Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Delete help

Author  Topic 

Sonu619
Posting Yak Master

202 Posts

Posted - 2013-05-21 : 23:28:34
Hi Guys,

How i can below data.
Here is sample data.

ID VALUE MVAL VALUE OCome
1 First 141 1 4
1 First 141 1 4


Thank You.

MuMu88
Aged Yak Warrior

549 Posts

Posted - 2013-05-21 : 23:38:16
If you mean to say how to delete duplicate entries:
Here is a way to do it:
[CODE]
DELETE t
FROM
(
SELECT ROW_NUMBER() OVER (PARTITION BY id, value, mval, value, ocome ORDER BY id) AS Seq,*
FROM Table
)t
WHERE Seq > 1

[/CODE]
Go to Top of Page

Sonu619
Posting Yak Master

202 Posts

Posted - 2013-05-21 : 23:46:22
Thanks. Thats what i want...
Go to Top of Page
   

- Advertisement -