create view PlanPro
as 
select  * from tb_product a where xx>(
(select sum(isnull(sl,0) ) sl from tb_kctotal b where a.id=b.productid ) +
(select sum(isnull(DDNum,0)) from tb_cgjh c where a.id=c.proid and c.type in(0,1))+
(select sum(isnull(SyNum,0)) from tb_cgdd d where a.id=d.proid and d.type in(0,1))

这个可以创建成功,但是运行的时候则会 出现sqlserver内部错误。如果xx>()后只有两个条件(任意两个条件)的话,就不会出现sqlserver内部错误。
请各位大侠指教。