空-城旧-梦 2015-11-02 07:08 采纳率: 73.3%
浏览 489

orcale+ibaits+java

报错信息:
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred while applying a parameter map.

--- Check the PriceAccuracyinfo.forRepot-InlineParameterMap.

--- Check the statement (query failed).

--- Cause: java.sql.SQLException: ORA-01747: user.table.column, table.column 或列说明无效

图片说明
图片说明

如图,在PL/SQL中能正常执行    可是放在程序里面却报 ORA-01747: user.table.column, table.column 或列说明无效 
列名仔细核对过了  除了ID 字段  其他字段没有用到关键字  求解!!!!以下是SQL
  <select id="forRepot" resultClass="hashMap" parameterClass="PriceAccuracy" >
SELECT rownum,e.* FROM (
    SELECT A.*, ROWNUM RN FROM (
      SELECT * FROM (select t.#groupBy# groupName,(
   select count(tt.targetpricebiasrate) from t_priceaccuracy_info tt 
          where t.#groupBy#=tt.#groupBy# and <![CDATA[To_Number(tt.targetpricebiasrate)<10]]>
          <isNotEmpty property="PROJECTNAME" prepend="and">tt.projectname=#PROJECTNAME#</isNotEmpty>
          <isNotEmpty property="CALCULATEWAY" prepend="and">tt.CALCULATEWAY=#CALCULATEWAY#</isNotEmpty>
          <isNotEmpty property="RESPONSIBLE" prepend="and">tt.RESPONSIBLE=#RESPONSIBLE#</isNotEmpty>
          <isNotEmpty property="PRICINGDATE" prepend="and"><![CDATA[tt.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]></isNotEmpty>
          <isNotEmpty property="PRICINGDATE" prepend="and"><![CDATA[tt.PRICINGDATE<to_date(#overDate#,'yyyy-MM-dd')]]></isNotEmpty>
            group by t.#groupBy#
    ) biasRate1,(
          select count(tt.targetpricebiasrate) from t_priceaccuracy_info tt 
            where t.#groupBy#=tt.#groupBy# and <![CDATA[To_Number(tt.targetpricebiasrate)<20]]> and <![CDATA[To_Number(tt.targetpricebiasrate)>=10]]> 
               <isNotEmpty property="PROJECTNAME" prepend="and">tt.projectname=#PROJECTNAME#</isNotEmpty>
          <isNotEmpty property="CALCULATEWAY" prepend="and">tt.CALCULATEWAY=#CALCULATEWAY#</isNotEmpty>
          <isNotEmpty property="RESPONSIBLE" prepend="and">tt.RESPONSIBLE=#RESPONSIBLE#</isNotEmpty>
          <isNotEmpty property="PRICINGDATE" prepend="and"><![CDATA[tt.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]></isNotEmpty>
          <isNotEmpty property="PRICINGDATE" prepend="and"><![CDATA[tt.PRICINGDATE<to_date(#overDate#,'yyyy-MM-dd')]]></isNotEmpty>
            group by t.#groupBy#

) biasRate2,(
select count(tt.targetpricebiasrate) from t_priceaccuracy_info tt
where t.#groupBy#=tt.#groupBy# and <![CDATA[To_Number(tt.targetpricebiasrate)>20]]>
tt.projectname=#PROJECTNAME#
tt.CALCULATEWAY=#CALCULATEWAY#
tt.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[tt.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[tt.PRICINGDATE
group by t.#groupBy#
) biasRate3,(
select count(tt.targetpricebiasrate) from t_priceaccuracy_info tt
where t.#groupBy#=tt.#groupBy#
tt.projectname=#PROJECTNAME#
tt.CALCULATEWAY=#CALCULATEWAY#
tt.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[tt.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[tt.PRICINGDATE
group by t.#groupBy#
) allNum,(
select (
select count(b.targetpricebiasrate) from t_priceaccuracy_info b
where t.#groupBy#=b.#groupBy# and <![CDATA[To_Number(b.targetpricebiasrate)
b.projectname=#PROJECTNAME#
b.CALCULATEWAY=#CALCULATEWAY#
b.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[b.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[b.PRICINGDATE
group by t.#groupBy#
)/(
select count(c.targetpricebiasrate) from t_priceaccuracy_info c
where t.#groupBy#=c.#groupBy# group by t.#groupBy#
) from t_priceaccuracy_info a where t.#groupBy#=a.#groupBy# group by t.#groupBy#
) biasRateRatio1,(
select (
select count(b.targetpricebiasrate) from t_priceaccuracy_info b
where t.#groupBy#=b.#groupBy# and <![CDATA[To_Number(b.targetpricebiasrate) and <![CDATA[To_Number(b.targetpricebiasrate)>=10]]>
b.projectname=#PROJECTNAME#
b.CALCULATEWAY=#CALCULATEWAY#
b.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[b.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[b.PRICINGDATE
group by t.#groupBy#
)/(
select count(c.targetpricebiasrate) from t_priceaccuracy_info c
where t.#groupBy#=c.#groupBy# group by t.#groupBy#
) from t_priceaccuracy_info a where t.#groupBy#=a.#groupBy# group by t.#groupBy#
) biasRateRatio2,(
select (
select count(b.targetpricebiasrate) from t_priceaccuracy_info b
where t.#groupBy#=b.#groupBy# and <![CDATA[To_Number(b.targetpricebiasrate)>20]]>
b.projectname=#PROJECTNAME#
b.CALCULATEWAY=#CALCULATEWAY#
b.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[b.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[b.PRICINGDATE
group by t.#groupBy#
)/(
select count(c.targetpricebiasrate) from t_priceaccuracy_info c
where t.#groupBy#=c.#groupBy# group by t.#groupBy#
) from t_priceaccuracy_info a where t.#groupBy#=a.#groupBy# group by t.#groupBy#
) biasRateRatio3
from t_priceaccuracy_info t
where 1=1
t.projectname=#PROJECTNAME#
t.CALCULATEWAY=#CALCULATEWAY#
t.RESPONSIBLE=#RESPONSIBLE#
<![CDATA[t.PRICINGDATE>to_date(#startDate#,'yyyy-MM-dd')]]>
<![CDATA[t.PRICINGDATE
group by t.#groupBy#)
)A WHERE <![CDATA[ROWNUM <= #page#*#rows#]]>
) e
WHERE <![CDATA[RN > (#page#-1)*#rows#]]>
order by ROWNUM desc
</sele

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
    • ¥15 C# datagridview 单元格显示进度及值
    • ¥15 thinkphp6配合social login单点登录问题
    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配