Sybase 11.9.2创建View支持union么
我单独执行
select a.invno, a.vo_sum-isnull(b.vo_sum,0) vo_sum from view_vodb_c_export_gp a,
view_vodb_d_export_gp b where a.invno*=b.invno
union
select b.invno, isnull(a.vo_sum,0)-b.vo_sum vo_sum from view_vodb_c_export_gp a,
view_vodb_d_export_gp b where a.invno=*b.invno
可以
然后想建立一个view
create view v1
as
select a.invno, a.vo_sum-isnull(b.vo_sum,0) vo_sum from view_vodb_c_export_gp a,
view_vodb_d_export_gp b where a.invno*=b.invno
union
select b.invno, isnull(a.vo_sum,0)-b.vo_sum vo_sum from view_vodb_c_export_gp a,
view_vodb_d_export_gp b where a.invno=*b.invno
提示我
Set operators may not appear within the definition of a view.
为什么???