Microsoft
Software
Hardware
Network
Question : SQL Query
I need to write a query to check for duplicates in data..
Columns of table
ItemNumber, ProductNumber, Country, List, Contract, DateCode, Cdate, AddDate, ModifyDate
The conditions for duplicates is that ItemNumber, ProductNumber,Cdate,
Must be unique
I Need to select these records
Answer : SQL Query
try this:
with cte
as
(
select * from (
select ranking = dense_rank() over(partition by itemnumber, productnumber, cdate order by newid()), *
from Pricing
) a
)
delete from cte
where ranking > 1
Random Solutions
Query to pull no service between certain time frame
Client-only rules in Outlook 2003
Ask about install windows service
Exchange 2003
How do copy only active window to clipboard in Windows XP?
viewing internat php page on apacher server through page viewer webpart
Attach txt file with sendmail
Windows7 in a 2003 domain
T-SQL DateTime conversion issue
How do I force a '0' value into a report