You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
344 B
14 lines
344 B
-- 老体检重复的收费项目数据
|
|
SELECT B.FeeItemCode,B. ID AS FID,A.* FROM
|
|
(
|
|
SELECT * FROM PEIS.DBO.FeeItem WHERE NAME IN
|
|
(
|
|
SELECT NAME FROM
|
|
(
|
|
SELECT COUNT(NAME) AS C,NAME FROM PEIS.DBO.FeeItem GROUP BY NAME
|
|
) T WHERE T.C>1
|
|
) -- ORDER BY Name
|
|
) A
|
|
LEFT JOIN vi_FeeItem B ON A.Name=B.FeeItemName
|
|
ORDER BY Name,FID
|
|
|