oracle - Show dates older than current date in sql query -
in sql statement have sql statement need show customers return dates overdue i.e. older current date, far query looks following:
select customers.firstname, items.itemname, custequipment.returndate, customers.phonenumber items join custequipment on items.itemid = custequipment.itemid join customers on custequipment.customerid=customers.customerid
this shows customers , return dates (along other info need) want show return dates have gone past current date, care point me in right direction please?
you can date comparison in where
clause:
select customers.firstname, items.itemname, custequipment.returndate, customers.phonenumber items join custequipment on items.itemid = custequipment.itemid join customers on custequipment.customerid=customers.customerid returndate <= trunc(sysdate);
i adjusted query use correct join
syntax.
Comments
Post a Comment