[导入]SQL编写规范

Posted on 2006-01-11 14:40 yoyozy 阅读(200) 评论(0)  编辑  收藏
1.书写格式
  
  示例代码:
  
  存储过程SQL文书写格式例
  select
  c.dealerCode,
  round(sum(c.submitSubletAmountDLR + c.submitPartsAmountDLR + c.submitLaborAmountDLR) / count(*), 2) as avg,
  decode(null, 'x', 'xx', 'CNY')
  from (
  select
  a.dealerCode,
  a.submitSubletAmountDLR,
  a.submitPartsAmountDLR,
  a.submitLaborAmountDLR
  from SRV_TWC_F a
  where (to_char(a.ORIGSUBMITTIME, 'yyyy/mm/dd') >= 'Date Range(start)'
  and to_char(
文章来源:http://blog.donews.com/yoyozy/archive/2005/11/04/615205.aspx

只有注册用户登录后才能发表评论。


网站导航:
 

posts - 15, comments - 0, trackbacks - 0, articles - 1

Copyright © yoyozy