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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -