ASP和access数据库里求和语句能加条件语名吗,请高手进来指点。
,sum(casewhenrzdg=falseandrzjk=falseandrzsh=truethencwgl_rzgl.rzjeend)ashjsr1这样写能行吗,应...
,sum(case when rzdg=false and rzjk=false and rzsh=true then cwgl_rzgl.rzje end) as hjsr1
这样写能行吗,应该怎么写呀
sql = "select MONTH (rzrq) AS bbrq,sum(case when rzdg=false and rzjk=false then cwgl_rzgl.rzje end) as hjsr1,sum(case when rzdg=false and rzjk=true then cwgl_rzgl.rzje end) as hjsr2,sum(case when rzdg=true and rzjk=false then cwgl_rzgl.rzje end) as hjsr3,sum(case when rzdg=true and rzjk=true then cwgl_rzgl.rzje end) as hjsr4 from cwgl_rzgl,cwgl_czgl where YEAR (rzrq)=2012 and rzsh=true group by MONTH (rzrq)这样写为什么ASP里不能显示呀,应该怎么写呀 展开
这样写能行吗,应该怎么写呀
sql = "select MONTH (rzrq) AS bbrq,sum(case when rzdg=false and rzjk=false then cwgl_rzgl.rzje end) as hjsr1,sum(case when rzdg=false and rzjk=true then cwgl_rzgl.rzje end) as hjsr2,sum(case when rzdg=true and rzjk=false then cwgl_rzgl.rzje end) as hjsr3,sum(case when rzdg=true and rzjk=true then cwgl_rzgl.rzje end) as hjsr4 from cwgl_rzgl,cwgl_czgl where YEAR (rzrq)=2012 and rzsh=true group by MONTH (rzrq)这样写为什么ASP里不能显示呀,应该怎么写呀 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询