免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1207 | 回复: 1
打印 上一主题 下一主题

[SCO UNIX] 帮我看一看这个4gl 程序错在哪了?谢谢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-14 09:31 |只看该作者 |倒序浏览
database picc2
define  a integer
define op_date date
define i_info_date date
main
if op_date>;i_info_date then
let a=0
let a=year(op_date)-year(i_info_date)
if a=1 then
     select pol_code,sum(prem) from day_sta_data
     where pay_itrvl1="Y"  and i_info_appl_branch="450021"
  end if
end if
end main

论坛徽章:
0
2 [报告]
发表于 2003-06-14 10:33 |只看该作者

帮我看一看这个4gl 程序错在哪了?谢谢

是查询语句写错了吧,查询字段中如果有聚类函数,则其它字段必须在group by 里。
the correct is:
select pol_code,sum(prem) from day_sta_data
         where pay_itrvl1="Y" and i_info_appl_branch="450021"
         group by    pol_code
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP