日期:2014-05-19  浏览次数:20824 次

各位大侠帮我看看这是哪错了急!
sql = "insert into"+ dbStat +"s50ewtbuyring (id, usernumber, opertime, ringtype, ringfee)"+
 " values(SEQ_STATOPLOG.NEXTVAL,'"+userNumber+"',"+to_char(sysdate,'YYYY.MM.DD HH24:MI:SS')+","+ringType+","+ringfee;

这里面的to_char哪有写错吗怎么在java里提示Invalid character constant这个错误

------解决方案--------------------
sql = "insert into"+ dbStat +"s50ewtbuyring (id, usernumber, opertime, ringtype, ringfee)"+
" values(SEQ_STATOPLOG.NEXTVAL,'"+userNumber+"',"+"to_char(sysdate,'YYYY.MM.DD HH24:MI:SS')+"+","+ringType+","+ringfee;