Computer(IT)/Oracle

중복데이터 체크

약탄치킨 2013. 1. 28. 10:00
반응형

중복 데이터 체크 (같은 아이디가 두개 이상인 값의 요청 ID)

 

 

select t.srm_id, t.srm_crm_call_id ,t2.cnt
from eso_srm t,
(select srm_crm_call_id, count(srm_crm_call_id) as cnt
from eso_srm
where srm_crm_call_id is not null
group by srm_crm_call_id) t2
where t.srm_crm_call_id=t2.srm_crm_call_id
and t2.cnt > 1