I am trying to return values based on dates in a query. I have a date value of 05/23/2008 that I'm searching a record for. When I pass lc_bdate with 05/23/2008 and lc_edate with 05/23/2008 using a between clause, I get no results. However, when I pass When I pass lc_bdate with 05/23/2008 and lc_edate with 05/24/2008, then I do get the 05/23/2008 record correctly. Is there something special about this BETWEEN() clause I should keep in mind. Here is my query by the way:
SELECT Institutions.i_instname, Products.p_productname,;
Products.p_itemcode, Inst_request.ir_orderby, Inst_request.ir_orddte,;
Inst_request.ir_instordreq, Institutions.i_instid,;
Products.p_productid, Inst_request.ir_id,;
Inst_request.ir_actordaccepted, Inst_request.ir_delivery_type,;
Products.p_qtyperunit;
FROM ;
warehouse!inst_request ;
INNER JOIN warehouse!products ;
ON Inst_request.ir_prodid = Products.p_productid ;
INNER JOIN warehouse!institutions ;
ON Inst_request.ir_inst_id = Institutions.i_instid;
WHERE ( Inst_request.ir_orddte BETWEEN ?lc_bdate AND ?lc_edate;
AND Inst_request.ir_inst_id BETWEEN ?lc_fwid AND ?lc_twid );
AND Inst_request.ir_ordercomplete = ( ?lc_ordcomp );
ORDER BY Inst_request.ir_orddte
thanks
nick