'19820606000000' 형태의 스트링 날짜를 timestamp로 넣어야하는데..
java소스상에서
String ISQL=
"insert into certs ("+
"serial,status,laststatus,issue_date,expire_date,event_date,"+
"policy,userid,timeid,cid,name,mail)"+
"values(?,?,?, " +
"?,?,?,"+
"?,?,?,?,?,?)";
DB_obj.pStmtBatch.setString(1, serial);
DB_obj.pStmtBatch.setString(2, status);
DB_obj.pStmtBatch.setString(3, laststatus)
DB_obj.pStmtBatch.setString(4, issue_date);
DB_obj.pStmtBatch.setString(5, expire_date);
DB_obj.pStmtBatch.setString(6, event_date);
DB_obj.pStmtBatch.setString(7, policy);
DB_obj.pStmtBatch.setString(8, userid);
DB_obj.pStmtBatch.setString(9, timeid);
DB_obj.pStmtBatch.setString(10, cid);
DB_obj.pStmtBatch.setString(11, name);
DB_obj.pStmtBatch.setString(12, mail);
이렇게 바로 넣어주니 에러가 나더라구요..
2008-01-26 23:59:59.0 형태로 들어가야하는데... 쩝
너무 급한데 답변좀 부탁드려요 ㅜㅜ
String ISQL=
"insert into certs ("+
"serial,status,laststatus,issue_date,expire_date,event_date,"+
"policy,userid,timeid,cid,name,mail)"+
"values(?,?,?, " +
"to_timestamp(?,"+yyyy-mm-dd hh24:mi:ss)"
"to_timestamp(?,"+yyyy-mm-dd hh24:mi:ss)"
"to_timestamp(?,"+yyyy-mm-dd hh24:mi:ss)"
"?,?,?,?,?,?)";
이렇게 해봐도 에러가나던데...
|