免费注册 查看新帖 |

Chinaunix

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

关于临时表的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-02 15:20 |只看该作者 |倒序浏览
本帖最后由 B06022208 于 2010-11-02 15:37 编辑

select
  t1.policyno,t1.insuredname ||' ',t1.appliname ||' ',t1.operatedate,
  t1.startdate,t1.enddate,
  t1.licenseno ||' ',t1.engineno ||' ' ,t1.sumamount,t1.sumpremium,
  t1.handler1code
  from prpcmain t1
  where comcode[1,6] = '320112'
  and riskcode[1] = 'D'
  and startdate between '20091001' and '20091031'
--and sfxinb[1] = '1'
  and underwriteflag in ('1','3')
  and othflag[4] !='1'
into temp t1;
我在使用上面语句在informix提数时,出现Virtual column must have explicit name的错误,哪位牛人能给我指点一下。
我在线等各位的解答。谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2010-12-24 22:07 |只看该作者
select
  t1.policyno,t1.insuredname ||' ',t1.appliname ||' ',t1.operatedate,
  t1.startdate,t1.enddate,
  t1.licenseno ||' '  as  licenseno ,t1.engineno ||' ' as  engineno  ,t1.sumamount,t1.sumpremium,
  t1.handler1code
  from prpcmain t1
  where comcode[1,6] = '320112'
  and riskcode[1] = 'D'
  and startdate between '20091001' and '20091031'
--and sfxinb[1] = '1'
  and underwriteflag in ('1','3')
  and othflag[4] !='1'
into temp t1;

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
3 [报告]
发表于 2010-12-24 22:14 |只看该作者
t1.insuredname ||' ',
改成 t1.insuredname ||' ' insuredname,
试下。。

论坛徽章:
0
4 [报告]
发表于 2011-01-01 11:29 |只看该作者
临时表的每一列都要有列名的不能默认
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP