软件开发

创建视图报错

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 个回答铁血华仔的回答

铁血华仔铁血华仔研发工程师koal
我现在的版本是IBM Informix Dynamic Server Version 10.00.FC3R1 ,别人用的好像是10.03的
软件开发 · 2013-03-14
浏览604

回答者

铁血华仔
研发工程师koal

铁血华仔 最近回答过的问题

回答状态

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