select *
--getparentnodename(t.industryoid) as 三级词类,
from ejsjdictionaryadd t
WHERE concat(t.chwordname,t.enwordname) in(
SELECT concat(t1.chwordname,t1.enwordname) FROM ejsjdictionaryadd t1 GROUP BY concat(t1.chwordname,t1.enwordname) HAVING COUNT(*)>1)
ORDER BY t.diccode DESC
/*重复记录查询
*/
select *
from ejsjdictionaryadd t
WHERE concat(t.chwordname,t.enwordname) in(
SELECT concat(t1.chwordname,t1.enwordname) FROM ejsjdictionaryadd t1 GROUP BY concat(t1.chwordname,t1.enwordname) HAVING COUNT(*)=1)
ORDER BY t.diccode DESC
/*去除重复记录查询
/*
去除重复记录查询 给重复记录编号后
select t.CODE, t.NAME, t.NAME_SHORT, t.PHONE_NUMBER
from (SELECT DP.CODE,
DP.NAME,
DP.NAME_SHORT,
DP.PHONE_NUMBER,
row_number() over(partition by DP.NAME_SHORT order by DP.NAME_SHORT) rn
FROM DELIVERY_POINT DP, CUSTOMER_DELIVERY_POINT CDP, CUSTOMER C
WHERE DP.CODE = CDP.DELIVERY_POINT_CODE
AND C.CODE = CDP.CUSTOMER_CODE
AND CDP.STATUS_FLAG = 1
AND DP.STATUS_FLAG = 1
AND DP.CODE <> '00000'
AND C.COMPANY_CODE = 'RS') t
where t.rn = 1
*/