Foxtable(狐表)用户栏目专家坐堂 → 求助关于SQL语句中支持的常用函数Round


  共有10760人关注过本帖树形打印复制链接

主题:求助关于SQL语句中支持的常用函数Round

帅哥哟,离线,有人找我吗?
yankunhao
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1038 积分:7299 威望:0 精华:0 注册:2008/9/1 22:34:00
求助关于SQL语句中支持的常用函数Round  发帖心情 Post By:2011/1/19 10:15:00 [显示全部帖子]

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
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1038 积分:7299 威望:0 精华:0 注册:2008/9/1 22:34:00
  发帖心情 Post By:2011/1/19 10:39:00 [显示全部帖子]

现在明白了,是起作用的,只是我的数据显示有问题。

 回到顶部