select
CFCUSTOMERID
from
CT_TAR_TargerTerminal t
where
CFBUSINESSREPRESEN='mEcAAAbGKaKA733t'
and (
t.cfisdeleted=0
or t.cfisdeleted is null
)
and (
select
FShortName
from
T_BD_Material
where
fid = t.cfproductid
)='优立通'
and (
select
b.fname_l2
from
ct_bas_hospitalbasedata a
left join
ct_bas_hospitallevel b
on a.cfhospitallevelid=b.fid
where
cfhospitalcodeid= t.CFCUSTOMERID
) not in (
'连锁分店','诊所【卫生院(室、站)】','单体药店','社区','连锁总店' , ' '
)
最后 not in () 如果 改成 '' 一条数据也出不来 不知道为什么