大家帮我看看下面这个SQL语句哪儿出问题了,老提示CASE WHEN.....THEN附近有语法错误select a.zyh as 住院
selecta.zyhas住院业务号,a.idas序号,a.fycodeas药品编码,isnull(b.gg,'\')as规格,''as剂型,b.dwas单位,(case...
select a.zyh as 住院业务号,a.id as 序号,a.fycode as 药品编码,isnull(b.gg,'\') as 规格,'' as 剂型,b.dw as 单位,(case when b.dj=0 then select a.fymoney from zy_fymx when b.dj<>0 then select b.dj from zd_jjb end) as 单价,'' as 数量,a.fydate as 使用日期,a.fymoney as 金额,a.fymoney as 实际金额 from zy_fymx a,zd_jjb b where a.fycode=b.bm and a.zyh='141'
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询