Meu INSERT ficou gigante e eu quero quebrar para a linha debaixo. Existe uma regra não é? Alguem pode me ajudar?
Esse é o INSERT:
PreparedStatement stmt = this.connection.prepareStatement
("insert into contatos (CD_EMPGCB, CD_FIL, CD_LFRPT_RLG, CD_EMPGCB_FUN, CD_FUN, CD_JORRPT, CD_MSGRPT, ST_LFRPT, CD_LFRPT_VIA_CCH, ST_LFRPT_ICL ) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
Obrigado.
somma
#2
PreparedStatement stmt = this.connection.prepareStatement(“insert into contatos (CD_EMPGCB,”+
" CD_FIL, CD_LFRPT_RLG, CD_EMPGCB_FUN, CD_FUN, CD_JORRPT, CD_MSGRPT, ST_LFRPT,"+
" CD_LFRPT_VIA_CCH, ST_LFRPT_ICL ) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
é só concatenar… como feito acima
ola amigo,
crie primeiro a String com a query e depois crie o PreparedStatement.
Exe:
StringBuilder query = new StringBuilder( "" );
query.append( "INSERT INTO TAB_x " );
query.append( " ... " );
PreparedStatement stmt = this.connection.prepareStatement( query.toString() ) ;