Estou fazendo um campo de pesquisa que busca uma numeração em uma tabela do PostgreSQL. Porém estou recebendo o seguinte erro ;
“Operator does not exist: integer == character varying”
Meu código está assim;
public void pesquisarNfe(){ String sql = "Select *from nfe where n_nfe == ?"; try{ pst = conecta.prepareStatement(sql); pst.setString(1, txtPesquisar.getText()+"%"); rs = pst.executeQuery(); tblNfe.setModel(DbUtils.resultSetToTableModel(rs)); } catch(SQLException error){ JOptionPane.showMessageDialog(null, error); } }
Onde estou errando ?