SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Delete help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sonu619
Posting Yak Master

195 Posts

Posted - 05/21/2013 :  23:28:34  Show Profile  Reply with Quote
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

547 Posts

Posted - 05/21/2013 :  23:38:16  Show Profile  Reply with Quote
If you mean to say how to delete duplicate entries:
Here is a way to do it:

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

Go to Top of Page

Sonu619
Posting Yak Master

195 Posts

Posted - 05/21/2013 :  23:46:22  Show Profile  Reply with Quote
Thanks. Thats what i want...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000