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
Receive Connector for Exchange 2007 Server to Receive From Barracuda FW 300
-2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]Connectio<wbr />nWrite(Wra<wbr />pperWrite(<wbr />))
How can I change the colour of text in a report field to match a colour specified in the report?
How do you restore a smaller partition image of Windows XP onto a larger disk and still have Windows XP boot up recognizing the larger disk size?
Using rtrim in my query
.net framework 3.5 install hangs
Script Error; line 2057; res://ieframe.dll.preview.<wbr />js
How do I find whether a bittorrent (protocol), application is running on a computer
Setting Office (Excel) workgroup templates location
C# equation to Compress string