You can't specify target table for update in FROM clause
mysql> Update EACONTACTGROUPS A
SET GROUPNAME=(Select CONCAT(B.GROUPNAME,'-',A.GROUPNAME) FROM EACONTACTGROUPS B Where B.CORPID=A.CORPID AND B.USERID=A.USERID AND B.GROUPID=A.PARENTGROUPID)
Where A.PARENTGROUPID IS NOT NULL;
ERROR 1093 (HY000): You can't specify target table 'A' for update in FROM clause
上面是目前MYSQL5.0仍然有的限制,文档中说:
In general, you cannot modify a table and select from the same table in a subquery. For example, this limitation applies to statements of the following forms:
mysql> Update EACONTACTGROUPS A
SET GROUPNAME=(Select CONCAT(B.GROUPNAME,'-',A.GROUPNAME) FROM EACONTACTGROUPS B Where B.CORPID=A.CORPID AND B.USERID=A.USERID AND B.GROUPID=A.PARENTGROUPID)
Where A.PARENTGROUPID IS NOT NULL;
ERROR 1093 (HY000): You can't specify target table 'A' for update in FROM clause
上面是目前MYSQL5.0仍然有的限制,文档中说:
In general, you cannot modify a table and select from the same table in a subquery. For example, this limitation applies to statements of the following forms:
Tomcat中web.xml文件的详细说明
<?xml version="1.0" encoding="GB2312"?> <!--
Web.xml依次定议了如下元素:
<web-app>
<display-name></display-name> 定义了WEB应用的名字
<description></description> 声明WEB应用的描述信息
<filter></filter>
<filter-mapping></filter-mapping>
<servlet></servlet>
<?xml version="1.0" encoding="GB2312"?> <!--
Web.xml依次定议了如下元素:
<web-app>
<display-name></display-name> 定义了WEB应用的名字
<description></description> 声明WEB应用的描述信息
<filter></filter>
<filter-mapping></filter-mapping>
<servlet></servlet>
Tags: TOMCAT
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:265)
jsp文件如下:
graduateList是一个类,而logic:iterator要求必须是ArrayList,HashSet....这样的集合类,而graduateList中一个属性是ArrayList或HashSet的
应改为:
jsp文件如下:
复制内容到剪贴板 程序代码
<logic:notEmpty name="graduateList" >
<logic:iterate id="graduate" name="graduateList" >
</ogic:notEmpty >
</ogic:iterat>
<logic:iterate id="graduate" name="graduateList" >
</ogic:notEmpty >
</ogic:iterat>
graduateList是一个类,而logic:iterator要求必须是ArrayList,HashSet....这样的集合类,而graduateList中一个属性是ArrayList或HashSet的
应改为:
复制内容到剪贴板 程序代码
<logic:notEmpty name="graduateList" property="items">