22,209
社区成员
发帖
与我相关
我的任务
分享
select distinct A.a0100 from lackarchives B,
(
select a0100,'A0141' as colname,A0141 as colvalue from sba01 where A0141!=''
union
select a0100,'AdministrativeLevels' as colname,AdministrativeLevels as colvalue from sba01 where AdministrativeLevels!=''
union
select a0100,'TechnicalLevel' as colname,TechnicalLevel as colvalue from sba01 where TechnicalLevel!=''
union
select a0100,'PostPosition' as colname,PostPosition as colvalue from sba01 where PostPosition!=''
union
select a0100,'CulturalDegree' as colname,CulturalDegree as colvalue from sba01 where CulturalDegree!=''
union
select a0100,'AdministrativeLevels-R' as colname,AdministrativeLevels as colvalue from resume where AdministrativeLevels!=''
union
select a0100,'PostPosition-R' as colname,Position as colvalue from resume where Position!=''
union
select a0100,'PXDDDN' as colname,PXDDDM as colvalue from pxtable where PXDDDM!=''
union
select a0100,'JCDM' as colname,JCDM as colvalue from jctable where JCDM!=''
union
select a0100,'A1204' as colname, cast(A1204 as varchar) as colvalue from a12 where A1204!=''
union
select a0100,'PXXZDM' as colname,PXXZDM as colvalue from a08 where PXXZDM!=''
) As A
where A.colvalue!=''
and A.colvalue=B.dircode and B.hlpcode=A.colname
and not exists
(
select 1 from lackarchives C where C.hlpcode=A.colname and C.dircode=A.colvalue
and C.archid in (select clcodetype from archives where archives.a0100=A.a0100 )
)) as c
and kind='某一类材料名称的id'