Eldo Skaria wrote:
Hi,
I think the query has to be considering the count rather than the sum. the query can be like this:
select pkfield1[,pkfield2[,pkfield3[,....]]], count(1) from <your_table> group by pkfield1[,pkfield2[,pkfield3[,....]]] having count(1) > 1
Here u can add n-number of feilds which u want make PK.
Reg,
Eldo.
count(1) is the same as sum(1)
After thinking more about the 'group by' clause, I think I was wrong to start with. You don't have to concat() the fields, and can use the above clause.
-- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]