oracle insert into报错

我是社区第2719位番薯,欢迎点我头像关注我哦~
begin
insert into TMP_MLBrandSALE(saleno,plucode,depcode,depname,htcode,htname,shpcode,shpname,cntarea,manascope,xscount,hxtotal,hmtotal,qs)
select saleno,substr(c.plucode,1,4),c.depcode,c.depname,a.htcode,a.htname,shpcode,shpname,a.cntarea,a.manascope,c.xscount,c.hxtotal,hmtotal,'0'
       from  vhtdep a  right join (TSALPLUDETAIL201207) c on c.cntid=a.cntid  where c.orgcode='1009'  and c.depcode like   
       '%11%' and  c.depcode in (select depcode from tusrrightorg where orgcode='1009') and rptdate between '2012-07-01' and '2012-07-01';
insert into TMP_MLBrandSALE(saleno,plucode,depcode,depname,htcode,htname,shpcode,shpname,cntarea,manascope,xscount,hxtotal,hmtotal,qs)
select saleno,substr(c.plucode,1,4),c.depcode,c.depname,a.htcode,a.htname,shpcode,shpname,a.cntarea,a.manascope,c.xscount,c.hxtotal,hmtotal,'1'
       from  vhtdep a  right join (TSALPLUDETAIL201206) c on c.cntid=a.cntid  where c.orgcode='1009'  and c.depcode like   
       '%11%' and  c.depcode in (select depcode from tusrrightorg where orgcode='1009') and rptdate between '2012-06-01' and '2012-06-01';
insert into TMP_MLBrandSALE(saleno,plucode,depcode,depname,htcode,htname,shpcode,shpname,cntarea,manascope,xscount,hxtotal,hmtotal,qs)
select saleno,substr(c.plucode,1,4),c.depcode,c.depname,a.htcode,a.htname,shpcode,shpname,a.cntarea,a.manascope,c.xscount,c.hxtotal,hmtotal,'2'
       from  vhtdep a  right join (TSALPLUDETAIL201107) c on c.cntid=a.cntid  where c.orgcode='1009'  and c.depcode like   
       '%11%' and  c.depcode in (select depcode from tusrrightorg where orgcode='1009') and rptdate between '2011-07-01' and '2011-07-01';
end;
在PLSQL中执行没问题,但是在帆软中,报错
ORA-06550: 第 1 行, 第 6 列:
PLS-00103: 出现符号 ""在需要下列之一时:
begin case declare exit for
   goto if loop mod null pragma raise return select update while
   with <an identifier> <a double-quoted delimited-identifier>
   <a bind variable> << close current delete fetch lock insert
   open rollback savepoint set sql execute commit forall merge
   pipe
符号 "" 被忽略。
ORA-06550: 第 2 行, 第 135 列:
PLS-00103: 出现符号 ""在需要下列之一时:
( select values
符号 "" 被忽略。
ORA-06550: 第 3 行, 第 144 列:
PLS-00103: 出现符号 ""在需要下列之一时:
, * & - + / at mod remainder
   rem <an identifier> <a double-quoted delimited-identifier>
   <an exponent (**)> as from || multiset

发表于 2012-7-23 09:34:24
类似这样的,最好是创建个存储过程,然后直接调用过程,而不是直接在FR的数据集面板里面写,那个面板纠错能力比较差,而且以后改也不好维护
发表于 2017-8-5 23:36:29
select depcode from tusrrightorg   一看就是用的海信系统,我也是用过几年海信的,我都是在FR里直接查询表来使用
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

2回帖数 1关注人数 4788浏览人数
最后回复于:2017-8-5 23:36

返回顶部 返回列表