解决方案 »

  1.   

    insert into tab1 select ... from tab2 where ...
    这个意思么?
      

  2.   

    做个定时任务,然后insert into tab1 select ... from tab2 where ... 插入查询出来的前一天数据   如楼上所说
      

  3.   

    eclipse也不用了吧,直接数据库建个定时任务,然后把sql放上,每天早上自动执行就行了。
      

  4.   

    我是设置了一个按钮,点击它就插入那些数据。
    然后报了个错系统运行错误信息:
    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.
      

  5.   

    你的sql语句可能有问题,你先把你的sql语句在数据库里运行一下,如果ok,说明语法正确;然后在你的语句用try...catch....试试
      

  6.   

    我是设置了一个按钮,点击它就插入那些数据。
    然后报了个错系统运行错误信息:
    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>。
      

  7.   


    sql语句可以的,我刚在数据库试了下。我想通过页面上的按钮来执行这个sql语句,应该怎么写呢。
      

  8.   

    我是设置了一个按钮,点击它就插入那些数据。
    然后报了个错系统运行错误信息:
    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>。
    真的写错了