您的位置:程序门 -> vb -> 数据库(包含打印,安装,报表)



union all无法使用于dataenvironment


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


union all无法使用于dataenvironment
发表于:2007-03-05 15:18:39 楼主
小弟有一组查询指令同样是查询   table   “invostok”   依i_type=   1或2来判断为进货与退货
语法如下
select   i_date   as   "日期 ",i_code   as   "单       号 ",i_stokcode   as   "物品编号 ",i_stokname   as   "物品名称 ",i_qty   as   "数量 ",   '厂家进货 '   as   "备注 "   from   invostok   where   i_stokcode=?   and   i_type= '1 '   and   i_date   between   ?   and   ?
union   all
select   i_date   as   "日期 ",i_code   as   "单       号 ",i_stokcode   as   "物品编号 ",i_stokname   as   "物品名称 ",i_qty*-1   as   "数量 ", '厂家退货 '   as   "备注 "   from   invostok   where   i_stokcode=?   and   i_type= '2 '   and   i_date   between   ?   and   ?

之前只用union查询的结果会把重复的删掉(数量一样即判断重复把我删除,但其实是2笔同数量的进货.此法在dataenvironment使用正常.   后来为了显示全部出来改成union   all
在dataenvironment却失败显示”不能决定参数的参数信息,使用参数选项卡来指定”
想请教高手可否指证我的错误,谢谢!!
发表于:2007-03-15 13:26:121楼 得分:0
这里人气太旺了,不顶一下马上被遗忘在角落里了.


快速检索

最新资讯
热门点击