这是我的配置文件
<sqlMap>
<typeAlias alias="erpSales" type="com.richfit.bi.imap.business.ErpSalesRelation"/>
<resultMap id="erpSaleRef" class="erpSales">
<result property="id" column="ID"/>
<result property="areaId" column="AREAID"/>
<result property="typeId" column="TYPEID"/>
<result property="income" column="INCOME"/>
<result property="typeName" column="ERP_SALES_TYPE.TYPENAME"/>
<result property="areaName" column="ERP_SALES_AREA.AREANAME"/>
</resultMap>
<!-- 获得销售对象-->
<select id="querySpecErpSales" parameterClass="string" resultMap="erpSaleRef" >
<![CDATA[
SELECT rel.Id,rel.AREAID,rel.TYPEID,rel.INCOME,type.TYPENAME,area.AREANAME
FROM ERP_SALES_RELATION rel,ERP_SALES_TYPE type,ERP_SALES_AREA area
WHERE area.AREANAME=#areaName# and area.AREAID=rel.AREAID and rel.TYPEID= type.TYPEID
]]>
</select>
</sqlMap>
这是我的ErpSalesRelation类
public class ErpSalesRelation
{
private int id;
private int typeId;
private int areaId;
private String typeName;
private String areaName;
private String income;
-----省略set/get方法
这是我的数据表
create table ERP_SALES_AREA
(
AREAID NUMBER(20) not null,
AREANAME VARCHAR2(14)
)
create table ERP_SALES_TYPE
(
TYPEID NUMBER(20) not null,
TYPENAME VARCHAR2(14)
)
create table ERP_SALES_RELATION
(
ID NUMBER(20) not null,
AREAID NUMBER(20) not null,
TYPEID NUMBER(20) not null,
INCOME VARCHAR2(20)
)
运行后报异常:
java.sql.SQLException: 列名无效
请高手指点到底拿错了.....!!!!
-
<iframe id="iframeu1636200_0" src="http://pos.baidu.com/rckm?rdid=1636200&dc=2&di=u1636200&dri=0&dis=0&dai=3&ps=2182x408&dcb=BAIDU_SSP_define&dtm=HTML_POST&dvi=0.0&dci=-1&dpt=none&tsr=0&tpr=1473296059518&ti=ibatis%20java.sql.SQLException%3A%20%E5%88%97%E5%90%8D%E6%97%A0%E6%95%88-CSDN%E8%AE%BA%E5%9D%9B-CSDN.NET-%E4%B8%AD%E5%9B%BD%E6%9C%80%E5%A4%A7%E7%9A%84IT%E6%8A%80%E6%9C%AF&ari=2&dbv=2&drs=3&pcs=1395x786&pss=1395x6467&cfv=0&cpl=4&chi=1&cce=true&cec=UTF-8&tlm=1473296059&rw=786&ltu=http%3A%2F%2Fbbs.csdn.net%2Ftopics%2F380037274&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DKElWaMhLKYMGCeOvilVEQFoyE4qMVPWUwYKWCaSYv1puoGcABVInb6aAZbHhw4yl%26wd%3D%26eqid%3Dca61898e000618b70000000557d0b6b7&ecd=1&psr=1920x1080&par=1920x1040&pis=-1x-1&ccd=24&cja=false&cmi=6&col=zh-CN&cdo=-1&tcn=1473296060&qn=ff9e4363d3b4ace7&tt=1473296059493.466.589.589" width="200" height="22" align="center,center" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true" style="box-sizing: content-box; border-width: 0px; border-style: initial; vertical-align: bottom; margin: 0px;"></iframe>
-
<iframe id="iframeu1636201_0" src="http://pos.baidu.com/rckm?rdid=1636201&dc=2&di=u1636201&dri=0&dis=0&dai=4&ps=2182x662&dcb=BAIDU_SSP_define&dtm=HTML_POST&dvi=0.0&dci=-1&dpt=none&tsr=0&tpr=1473296059518&ti=ibatis%20java.sql.SQLException%3A%20%E5%88%97%E5%90%8D%E6%97%A0%E6%95%88-CSDN%E8%AE%BA%E5%9D%9B-CSDN.NET-%E4%B8%AD%E5%9B%BD%E6%9C%80%E5%A4%A7%E7%9A%84IT%E6%8A%80%E6%9C%AF&ari=2&dbv=2&drs=3&pcs=1395x786&pss=1395x6467&cfv=0&cpl=4&chi=1&cce=true&cec=UTF-8&tlm=1473296059&rw=786&ltu=http%3A%2F%2Fbbs.csdn.net%2Ftopics%2F380037274&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DKElWaMhLKYMGCeOvilVEQFoyE4qMVPWUwYKWCaSYv1puoGcABVInb6aAZbHhw4yl%26wd%3D%26eqid%3Dca61898e000618b70000000557d0b6b7&ecd=1&psr=1920x1080&par=1920x1040&pis=-1x-1&ccd=24&cja=false&cmi=6&col=zh-CN&cdo=-1&tcn=1473296060&qn=74e2ac9d7a317eec&tt=1473296059493.467.592.593" width="200" height="22" align="center,center" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true" style="box-sizing: content-box; border-width: 0px; border-style: initial; vertical-align: bottom; margin: 0px;"></iframe>
-
<iframe id="iframeu1636204_0" src="http://pos.baidu.com/rckm?rdid=1636204&dc=2&di=u1636204&dri=0&dis=0&dai=5&ps=2182x916&dcb=BAIDU_SSP_define&dtm=HTML_POST&dvi=0.0&dci=-1&dpt=none&tsr=0&tpr=1473296059518&ti=ibatis%20java.sql.SQLException%3A%20%E5%88%97%E5%90%8D%E6%97%A0%E6%95%88-CSDN%E8%AE%BA%E5%9D%9B-CSDN.NET-%E4%B8%AD%E5%9B%BD%E6%9C%80%E5%A4%A7%E7%9A%84IT%E6%8A%80%E6%9C%AF&ari=2&dbv=2&drs=3&pcs=1395x786&pss=1395x6467&cfv=0&cpl=4&chi=1&cce=true&cec=UTF-8&tlm=1473296059&rw=786&ltu=http%3A%2F%2Fbbs.csdn.net%2Ftopics%2F380037274&ltr=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DKElWaMhLKYMGCeOvilVEQFoyE4qMVPWUwYKWCaSYv1puoGcABVInb6aAZbHhw4yl%26wd%3D%26eqid%3Dca61898e000618b70000000557d0b6b7&ecd=1&psr=1920x1080&par=1920x1040&pis=-1x-1&ccd=24&cja=false&cmi=6&col=zh-CN&cdo=-1&tcn=1473296060&qn=37d69ffb9faacabb&tt=1473296059493.469.652.653" width="200" height="22" align="center,center" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true" style="box-sizing: content-box; border-width: 0px; border-style: initial; vertical-align: bottom; margin: 0px;"></iframe>