| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
Select records that are expiring in a monthHi:
I want my query to select all records based on the field called expiry (date of expiry) that are expiring within a month from todays date. In other words records approaching expiry date. Saad; |
|
|||
|
u can use add _months function if u know that its going to expire within a month..or if u want a specific date then do..
i am new try it may help u select to_date('07-jul-99','dd-mon-rr') - hire_date as "no of days" from employees where to_date('07-jul-99','dd-mon-rr') - hire_date between 0 and 30 so these records wil be the ones that are going to expire |