空-城旧-梦 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 求帮我调试一下freefem代码
    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图