以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  求助关于SQL语句中支持的常用函数Round  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=9025)

--  作者:yankunhao
--  发布时间:2011/1/19 10:15:00
--  求助关于SQL语句中支持的常用函数Round

SELECT   {obas_sheet_kind}.sheet_kind_name as 单据类型,
         {ov_sal_ord_detail}.cust_name1 as 客户简称,      
         {ov_sal_ord_detail}.delivery_addr as 目的地,    
          {ov_sal_ord_detail}.sheet_no as 订单号,    
         {ov_sal_ord_detail}.part_item_no as 料品编码,  
         {ov_sal_ord_detail}.part_name as 料品名称,  
         {ov_sal_ord_detail}.part_spec as 料品规格,     
          {obas_base_code}.base_name as 单位,
         Round({ov_sal_ord_detail}.sheet_qty,2) as 订单数量,
         Round({ov_sal_ord_detail}.sheet_qty/12,2) as 打数,
         {ov_sal_ord_detail}.affirm_date as 确定交期,
         {osal_ord2}.define2 as 交期备注,  
         {ov_sal_ord_detail}.rem_a as 规格备注,     
         {osal_ord2}.define3 as 商标,
         {osal_ord2}.define1 as 包装,
         {ov_sal_ord_detail}.audit_sw as 单据状态,
         {obas_emp}.emp_name as 制单人,
         {osys_usergroup}.user_name  as 审核人,     
         {ov_sal_ord_detail}.sheet_lot as 订单批号,
         {ov_sal_ord_detail}.part_attr as 料品属性,  
         {ov_sal_ord_detail}.part_type as 料品类别, 
         {osal_ord1}.rem1 as 箱唛,
         {ov_sal_ord_detail}.sheet_date as 制单日期,
         {ov_sal_ord_detail}.delivery_type as 送货方式,     
         {ov_sal_ord_detail}.sheet_kind,  
         {ov_sal_ord_detail}.sheet_type,  
         {ov_sal_ord_detail}.pack_mark,  
         {ov_sal_ord_detail}.pack_mark1,   
         {ov_sal_ord_detail}.user_no,
         {ov_sal_ord_detail}.cust_no,
         {ov_sal_ord_detail}.part_no,
         {ov_sal_ord_detail}.emp_no,
         {ov_sal_ord_detail}.audit_user,
         {ov_sal_ord_detail}.sal_unit
    FROM ((((({ov_sal_ord_detail} left outer join {osal_ord1} on {ov_sal_ord_detail}.sheet_no={osal_ord1}.sheet_no) left outer join {osal_ord2} on {ov_sal_ord_detail}.sheet_lot={osal_ord2}.sheet_lot ) left outer join {obas_sheet_kind} on {ov_sal_ord_detail}.sheet_kind={obas_sheet_kind}.sheet_kind_no) left outer join {osys_usergroup} on {ov_sal_ord_detail}.audit_user={osys_usergroup}.user_no) left outer join {obas_emp} on {ov_sal_ord_detail}.emp_no={obas_emp}.emp_no) left outer join {obas_base_code} on {ov_sal_ord_detail}.sal_unit={obas_base_code}.base_code
   WHERE {ov_sal_ord_detail}.sheet_kind = \'SAL04\'and {ov_sal_ord_detail}.audit_sw=1 and {ov_sal_ord_detail}.sheet_lot={osal_ord2}.sheet_lot and {obas_base_code}.code_type=115
ORDER BY {ov_sal_ord_detail}.sheet_no ASC,  
         {ov_sal_ord_detail}.sheet_lot ASC

 

请问上面码中的红色部份为什么不起作用呢?


--  作者:yankunhao
--  发布时间:2011/1/19 10:39:00
--  
现在明白了,是起作用的,只是我的数据显示有问题。