what is wrong with this code ?? i want to campare two date field but it shows error .
<%
String chkdt = request.getParameter("chkdt");
SimpleDateFormat formater = new SimpleDateFormat("dd-MM-yyyy");
java.util.Date dt = formater.parse(chkdt);
java.sql.Date dte = new java.sql.Date(dt.getTime());
stmt=con.createStatement();
rst=stmt.executeQuery("select pf_party_name a, pf_cheque_amt b from pf_cheque_amt where pf_cheque_dt = " + dte );
%>
pf_cheque_dt is a column of a table of oracle data base and Data type of pf_cheque_dt is DATE,
help me here..
the error is
ORA-00932: inconsistent datatypes: expected DATE got NUMBER