SELECT a.*,b.name from chanpin as a,customer as b
where a.jianyan_riqi <=getdate() and
**************************************************************************
大家给看看下面这段sql(case when )可以嵌到 这吗,另外我的sql语法有问题吗
我现在对这sql有点乱,谢谢大家帮忙指点一下!!!!!!!!!!!
-------------------------
case when datediff(yy,getdate(),a.shengcan_riqi)> 12 then
'datediff(dd,getdate(),DATEADD(yy, 3, a.jianyan_riqi))> "&jytian& " '
else
'datediff(dd,getdate(),DATEADD(yy, 4, a.jianyan_riqi))> "&jytian& " '
end as Category //这个Category是我随便写的对吗
------------------------
*************************************************************************
order by bianhao
------解决方案--------------------
不能嵌