All Forums Database
thisisKumar 13 posts Joined 09/11
29 Sep 2011
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.

Jigar 70 posts Joined 09/11
30 Sep 2011

Sel  Col_List From Tab Where Last_Date >Date ;

rads 17 posts Joined 07/08
03 Oct 2011

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;

You must sign in to leave a comment.