Date logic for SQL

Database

Date logic for SQL

Hi, I have a table called Employee with Join Date and Last Date. This table may also contain future employees. Now I want to write a View to list all employees (current and future; but not previous employees). Can anyone suggest me best Date logic to get this information.

Tags (3)
2 REPLIES
N/A

Re: Date logic for SQL

Sel  Col_List From Tab Where Last_Date >Date ;

N/A

Re: Date logic for SQL

If I am not wrong the Last Date for all the previous employees will be holding some value since they are no longer part of the company. For the current and future employees last date will be null. So,

sel * from Table1 where Last_date is NULL;