insert into tab1 select ... from tab2 where ... 这个意思么?
做个定时任务,然后insert into tab1 select ... from tab2 where ... 插入查询出来的前一天数据 如楼上所说
eclipse也不用了吧,直接数据库建个定时任务,然后把sql放上,每天早上自动执行就行了。
我是设置了一个按钮,点击它就插入那些数据。 然后报了个错系统运行错误信息: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update.
我是设置了一个按钮,点击它就插入那些数据。 然后报了个错系统运行错误信息: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update. 检查一下你SqlMap的配置,是不是把<insert>写成了<select>。
sql语句可以的,我刚在数据库试了下。我想通过页面上的按钮来执行这个sql语句,应该怎么写呢。
我是设置了一个按钮,点击它就插入那些数据。 然后报了个错系统运行错误信息: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update. 检查一下你SqlMap的配置,是不是把<insert>写成了<select>。 真的写错了
这个意思么?
然后报了个错系统运行错误信息:
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update.
然后报了个错系统运行错误信息:
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update.
检查一下你SqlMap的配置,是不是把<insert>写成了<select>。
sql语句可以的,我刚在数据库试了下。我想通过页面上的按钮来执行这个sql语句,应该怎么写呢。
然后报了个错系统运行错误信息:
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Select statements cannot be executed as an update.; nested exception is java.sql.SQLException: Select statements cannot be executed as an update.
检查一下你SqlMap的配置,是不是把<insert>写成了<select>。
真的写错了