int check=-1; String sql=""; try { try { conn = ConnectionManager.getConnection(); } catch (NamingException e) { e.printStackTrace(); } sql += " INSERT INTO TABLE1"; sql += " (INCIDENT_ID, "; sql += " STRT_STD_LINK_ID, "; sql += " STOP_STD_LINK_ID, "; sql += " STRT_INFO_OFFR_ID, "; sql += " STOP_INFO_OFFR_ID, "; sql += " STRT_NODE_ID, "; sql += " STOP_NODE_ID, "; sql += " STRTDATE, "; sql += " STOPDATE, "; sql += " REGDATE, "; sql += " INCIDENT_DVSN, "; sql += " OTBR_CAUS, "; sql += " OTBR_CONTENTS, "; sql += " OTBR_DIR, "; sql += " INCIDENTCODE, "; sql += " INVOLVEDCODE, "; sql += " STATUSCODE, "; sql += " HUMANFATAL, "; sql += " HUMANINJURY, "; sql += " DAMAGECODE, "; sql += " STRTDISTANCE, "; sql += " STOPDISTANCE, "; sql += " PLANCODE, "; sql += " PLANDTLCODE, "; sql += " ROADWAYCODE, "; sql += " LANEBLOCK, "; sql += " SHOULDBLOCK, "; sql += " STRT_ITS_LINK_ID, "; sql += " STOP_ITS_LINK_ID, "; sql += " VMS_DSPL, "; sql += " VMS_DSPL_TEXT) "; sql += " VALUES "; sql += " ( ?, "; sql += " ?, "; sql += " ?, "; sql += " NULL, "; sql += " NULL, "; sql += " ?, "; sql += " ?, "; sql += " TO_CHAR('?', 'YYYY-MM-DD HH24:MI'), "; sql += " TO_CHAR('?,' 'YYYY-MM-DD HH24:MI'), "; sql += " TO_CHAR('20160201', 'YYYY-MM-DD HH24:MI'), "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " NULL, "; sql += " 'N', "; sql += " NULL) "; pstmt = conn.prepareStatement(sql); pstmt.setString(1, incident_id); pstmt.setString(2, strt_node_id); pstmt.setString(3, stop_node_id); pstmt.setString(4, strt_std_link_id); pstmt.setString(5, stop_std_link_id); pstmt.setString(6, strtdate); pstmt.setString(7, stopdate); check = pstmt.executeUpdate();
(부적절한 열 인덱스) >>날짜부분인것 같은데...조언 부탁드립니다.