|
发表于 2008-3-17 15:13:15
|
显示全部楼层
select a.beizhu as pzlb ,a.spid,b.kcshl,a.spbh,a.spmch,a.shpgg,a.shpchd,a.dw,a.shlv, a.zbz, a.jlgg,a.zgjjxz,b.chbdj,a.pizhwh,a.zjm, hsj as hshj, bhsj as dj, 0 as shj, a.leibie, b.zhjj*1.17 as zhjj,c.kehudengji,hsj as tmphshj from spkfk a(nolock),spkfjc b(nolock),sp_jggx c (nolock) where a.beactive='是' and a.spid=b.spid and a.spid=c.spid and a.is_zdpz<>'是' and a.is_zypz<>'是' and b.kcshl>0 and c.kehudengji = 'D' and (shangplx in (select * from dbo.f_splitstr('二类医疗器械,三类医疗器械,生物制品,生化药品,化学药制剂,抗生素制剂,中药饮片,中成药,生物制品(血液制品除外),二类精神药品,一类医疗器械',',')) or shangplx='非药品') and (a.spbh like '%zsyaqms%' or a.spmch like '%zsyaqms%' or a.zjm like '%zsyaqms%') order by spbh |
|