(oracle)如何解决这个很长的sql字符串:(怎样让他转行?)
lq_qq 2002-04-02 02:25:08
下面这个是一个长句,没有转换行,却无法执行
===========sql=================
String sql_post="
insert into R_text values(R_TEXT_SEQ.nextval,
title,
content,
'applytype',
to_date('2002-02-23 02:00:00','yyyy-mm-dd hh24:mi:ss'),
'author',
'provide',
'searchkey',
to_date('2002-02-23 02:00:00','yyyy-mm-dd hh24:mi:ss'),
'videopath',
'texttype',
'authorinfo',
to_date('2002-02-23 02:00:00','yyyy-mm-dd hh24:mi:ss'),
10,
'course')
";
===========end sql=================
jsp:
----------------------------
try{
stmt_post.executeUpdate(sql_post);
}catch (SQLException e) {
System.out.println("sql failed :"+e.toString());
}
conn_post.close();
----------------------------
sql failed :java.sql.SQLException: ORA-00936: 缺少表达式
我在sql*plus中可以执行--------但是必须换行,就像上面的转行sql的样子。