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
declaring constant variables using if's and elsif's
Changing forecolor in report lables
Outlook XP won't install MAPI services
export gridvie to exle
Export SQL Report without Report viewer
MSSQL Enterprise Manager on Windows 7 when I only have a SQL Server 2000 disk?
What are the various reasons that an Access 2003 MDB type application would display a Read-Only message (sometimes) when you launch the application?
How to get zip codes to convert properly from Excel to Access
Capture arrow keystrokes in a TForm
Is there a recycling bin in Windows 7?