| 发表于: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却失败显示”不能决定参数的参数信息,使用参数选项卡来指定” 想请教高手可否指证我的错误,谢谢!! |
|
|
|
|