HowtocreateaqueryfortheOracledatabasebyreturningalistofrequestsaccordingtoadaterange?
Followthecodecurrentlyused:
if(opcaoBusca.getSelectedIndex()==0){JOptionPane.showMessageDialog(null,"Escolha uma Opção de Busca!");
} else if (opcaoBusca.getSelectedIndex() == 1) {
RS = stmt.executeQuery("select numped FROM PCPEDC WHERE DATA > '10/01/2014' and numped = " + BuscaCodigo);
while (RS.next()) {
int Num = RS.getInt("numped");
consulta = false;
JOptionPane.showMessageDialog(null, "Dados Encontrado!!!!");
}
} else if (opcaoBusca.getSelectedIndex() == 2) {
RS = stmt.executeQuery("SELECT Data FROM PCPEDC WHERE Data BETWEEN " + Dtincial + "AND" + Dtfinal);
while (RS.next()) {
int Num = RS.getInt("numped");