FIND DUPLICATE RECORD
select CustomerMobileNo, transactionid, dup= count (*)from refund group by CustomerMobileNo, TransactionID having COUNT(*)>1
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Wim SturkenboomRank #2,527 · 554 reputationPosted Oct 19, 2014, 2:23 AM EDT
I guess you have an error
select CustomerMobileNo, transactionid, count (*) as dup from refund group by CustomerMobileNo, TransactionID having COUNT(*)>1
Not tested.
Nirmal KumarCRank #6,413 · 267 reputationPosted Oct 20, 2014, 3:57 AM EDT
Select shoppername,count(*) as cnt from dbo.sales having count(*) > 1 group by shoppername