[ slack3r @ 24.07.2011. 19:52 ] @
Hi, I'm 25 and I have issues... Dakle, prica je veoma jednostavna. U pitanju je sugar crm baza. Tokom importa iz CSV-a uvuklo se previse duplikata, no to nisu "cisti" duplikati. e.g. ![]() Dakle, uganjao sam duplikate po poljima name i email, ali treba sada da uklonim one dupes koji imaju za Industry=Other. Da bih lakse izveo ovo, merge-ovao sam potrebne podatke u jednu tabelu. Pokusao sam ovo, ali onda izvuce samo dupljake gdje oba unosa imaju industry=Other Code: select * from bo_contacts where (last_name, phone_work, email, industry) IN (select a.last_name, a.phone_work, a.email, a.industry FROM (select count(*) AS cnt, last_name, phone_work, email, industry from bizscm.bo_contacts GROUP by last_name,email HAVING cnt > 1) a where a.industry='Other'); |