int rs = st.executeUpdate("insert into \"Sys_User\"(\"UserID\","
+ UserName + "," + UserPwd + "," + DutyID + "," + RoleID + ","
+ Code + "," + LoginNum + "," + LastDate + "," + LastIP + ","
+ Locked + "," + MobilNum + "," + Tel + "," + Birthday + ","
+ RealName + ") values('" + u.getUserID() + "','"
+ u.getUserName() + "','" + u.getUserPwd() + "','"
+ u.getDutyID() + "','" + u.getRoleID() + "','" + u.getCode()
+ "'," + u.getLoginNum() + ",to_date('" + new Date()
+ "','yyyy-mm-dd-hh:mm:ss'),,'" + u.getLastIP() + "',"
+ u.getLocked() + ",'" + u.getMobilNum() + "','" + u.getTel()
+ "',to_date('" + new Date() + "','yyyy-mm-dd-hh:mm:ss'),'"
+ u.getRealName() + "')");
速度啦解决了都给分

解决方案 »

  1.   

    注明:String UserID = "\"UserID\"", UserName = "\"UserName\"", UserPwd = "\"UserPwd\"", RoleID = "\"RoleID\"", Code = "\"Code\"", LoginNum = "\"LoginNum\"", LastDate = "\"LastDate\"",LastIP="\"LastIP\"";
    String Locked="\"Locked\"",MobilNum="\"MobilNum\"",Birthday="\"Birthday\"",RealName="\"RealName\"";
    String DutyID="\"DutyID\"",Tel="\"Tel\"";
    String table = "\"Sys_User\"";
      

  2.   

    感觉是时间掩码的问题,
    'yyyy-mm-dd-hh:mm:ss'
    这中间的‘-’是不是改成空格
      

  3.   

    改成'yyyy-mm-dd hh24:mi:ss' 
      

  4.   

     + "','yyyy-mm-dd-hh:mm:ss'),,'" + u.getLastIP() + "',"
    这里多了个逗号,多谢2楼 三楼
      

  5.   

    都登陆了为什么还这样如需要阅读该回复,请登录或注册CSDN!
      

  6.   

    select aa.regioncode,aa.regionname,aa.Codbjcs COD报警次数,aa.Codjjcs COD接警次数,aa.Codclcs COD处理次数, bb.nhbjcs 氨氮报警次数,bb.nhjjcs 氨氮接警次数,bb.nhclcs 氨氮处理次数 ,cc.ycbjcs 烟尘报警次数,cc.ycjjcs 烟尘接警次数,cc.ycclcs 烟尘处理次数 ,dd.so2bjcs 二氧化硫报警次数,dd.so2jjcs 二氧化硫接警次数,dd.so2clcs 二氧化硫处理次数 ,ee.noxbjcs 氮氧化物报警次数,ee.noxjjcs 氮氧化物接警次数,ee.noxclcs 氮氧化物处理次数 from ( select a.regioncode, a.regionname, count(c.alarmcorpid) Codbjcs, nvl(sum(case when d.alarmconfirmflag=0 then 1 else 0 end ), 0) Codjjcs, nvl(sum(case when d.alarmfeedbackflag=0 and d.alarmconfirmflag=1 then 1 else 0 end ), 0) Codclcs from t_cod_region a left join t_info_alarmcorp_realation b on a.regioncode=b.districtcode left join T_Info_Alarm c on b.alarmcorpid =c.alarmcorpid and c.pllutantcode = 011 and c.pollutanttypecode = 1 and substr(c.alarmtime,1,13)>='2011-09-27 17' and c.alarmtime<='2011-09-28 17' left join T_Info_Alarm_ManualSend d on c.nid = d.nid and d.flag=3 where 1=1 and a.regioncode in () group by a.regioncode, a.regionname order by a.regioncode asc) aa left join (select a.regioncode, a.regionname, count(c.alarmcorpid) nhbjcs, nvl(sum(case when d.alarmconfirmflag=0 then 1 else 0 end ), 0) nhjjcs, nvl(sum(case when d.alarmfeedbackflag=0 and d.alarmconfirmflag=1 then 1 else 0 end ), 0) nhclcs from t_cod_region a left join t_info_alarmcorp_realation b on a.regioncode=b.districtcode left join T_Info_Alarm c on b.alarmcorpid = c.alarmcorpid and c.pllutantcode = 060 and c.pollutanttypecode = 1 and substr(c.alarmtime,1,13)>='2011-09-27 17' and substr(c.alarmtime,1,13)<='2011-09-28 17' left join T_Info_Alarm_ManualSend d on c.nid = d.nid and d.flag=3 where 1=1 and a.regioncode in () group by a.regioncode, a.regionname order by a.regioncode asc) bb on aa.regioncode=bb.regioncode left join (select a.regioncode, a.regionname, count(c.alarmcorpid) ycbjcs, nvl(sum(case when d.alarmconfirmflag=0 then 1 else 0 end ), 0) ycjjcs, nvl(sum(case when d.alarmfeedbackflag=0 and d.alarmconfirmflag=1 then 1 else 0 end ), 0) ycclcs from t_cod_region a left join t_info_alarmcorp_realation b on a.regioncode=b.districtcode left join T_Info_Alarm c on b.alarmcorpid = c.alarmcorpid and c.pllutantcode = 001 and c.pollutanttypecode =2 and substr(c.alarmtime,1,13)>='2011-09-27 17' and substr(c.alarmtime,1,13)<='2011-09-28 17' left join T_Info_Alarm_ManualSend d on c.nid = d.nid and d.flag=3 where 1=1 and a.regioncode in () group by a.regioncode, a.regionname order by a.regioncode asc) cc on cc.regioncode=bb.regioncode left join (select a.regioncode, a.regionname, count(c.alarmcorpid) so2bjcs, nvl(sum(case when d.alarmconfirmflag=0 then 1 else 0 end ), 0) so2jjcs, nvl(sum(case when d.alarmfeedbackflag=0 and d.alarmconfirmflag=1 then 1 else 0 end ), 0) so2clcs from t_cod_region a left join t_info_alarmcorp_realation b on a.regioncode=b.districtcode left join T_Info_Alarm c on b.alarmcorpid = c.alarmcorpid and c.pllutantcode = 002 and c.pollutanttypecode =2 and substr(c.alarmtime,1,13)>='2011-09-27 17' and substr(c.alarmtime,1,13)<='2011-09-28 17' left join T_Info_Alarm_ManualSend d on c.nid = d.nid and d.flag=3 where 1=1 and a.regioncode in () group by a.regioncode, a.regionname order by a.regioncode asc) dd on dd.regioncode=cc.regioncode left join (select a.regioncode, a.regionname, count(c.alarmcorpid) noxbjcs, nvl(sum(case when d.alarmconfirmflag=0 then 1 else 0 end ), 0) noxjjcs, nvl(sum(case when d.alarmfeedbackflag=0 and d.alarmconfirmflag=1 then 1 else 0 end ), 0) noxclcs from t_cod_region a left join t_info_alarmcorp_realation b on a.regioncode=b.districtcode left join T_Info_Alarm c on b.alarmcorpid = c.alarmcorpid and c.pllutantcode = 003 and c.pollutanttypecode =2 and substr(c.alarmtime,1,13)>='2011-09-27 17' and substr(c.alarmtime,1,13)<='2011-09-28 17' left join T_Info_Alarm_ManualSend d on c.nid = d.nid and d.flag=3 where 1=1 and a.regioncode in () group by a.regioncode, a.regionname order by a.regioncode asc) ee on ee.regioncode=dd.regioncode