软件开发

创建视图报错

drop view vw_gr_bus_txlist;create view vw_gr_bus_txlist(ic_issbank,ic_prono,txl_serial,txl_tramount,txl_trdate,txl_trflag,ic_cardno ,card_index) asselect card.ic_issbank,card.ic_prono,txl_serial,txl_tramount,txl_trdate,txl_trflag,tl.ic_cardno ,tl.car...显示全部
drop view vw_gr_bus_txlist;
create view vw_gr_bus_txlist
(
ic_issbank,ic_prono,txl_serial,txl_tramount,txl_trdate,txl_trflag,ic_cardno ,card_index
) as
select card.ic_issbank,card.ic_prono,txl_serial,txl_tramount,txl_trdate,txl_trflag,tl.ic_cardno ,tl.card_index from gr_card_req card
left join
(
select txl_serial,txl_tramount,txl_trdate,substr(txl_trflag,2,1) as txl_trflag,ic_cardno ,card_index from gr_bus_txlist1 as tx1 union all
select txl_serial,txl_tramount,txl_trdate,substr(txl_trflag,2,1) as txl_trflag,ic_cardno ,card_index from gr_bus_txlist2 as tx2 union all
select txl_serial,txl_tramount,txl_trdate,substr(txl_trflag,2,1) as txl_trflag,ic_cardno ,card_index from gr_bus_txlisthis as tx3 union all
select (ocd_cldate || ocd_batchno || ocd_batchsn) as txl_serial,ocd_tramount as txl_tramount,tag9a as txl_trdate,'9' as txl_trflag,ocd_acct_no as ic_cardno, substr(ocd_card_index,2,2) as card_index from gr_bus_hychkdet union all
select (ocd_cldate || ocd_batchno || ocd_batchsn) as txl_serial,ocd_tramount as txl_tramount,tag9a as txl_trdate,'9' as txl_trflag,ocd_acct_no as ic_cardno, substr(ocd_card_index,2,2) as card_index from gr_bus_offchkdet
) as tl
on card.ic_cardno=tl.ic_cardno
;
创建视图的时候报语法错误,informix是10.0.0版本的,别人在在10.03上上执行没问题,但我用的是10.0的版本,报语法错误,求大神帮忙啊!!!每个select语句单独执行都没问题,加时left join后整体执行就报错了:$收起
参与4

查看其它 2 个回答antyison的回答

antyisonantyison数据库运维工程师南大通用
版本这么细致。。。
IT其它 · 2013-03-12
浏览558

回答者

antyison
数据库运维工程师南大通用

antyison 最近回答过的问题

回答状态

  • 发布时间:2013-03-12
  • 关注会员:0 人
  • 回答浏览:558
  • X社区推广