title: Less Than and Equal to (<=) and Greater Than and Equal To (>=) abnormality
body: <p>I have a stored procedure for getting the information of an Employee which is automatically filtered by a select element in HTML. The main purpose of this stored procedure is to get all the information of Employee, after that If the Selected Month and Year was change and equal to the Employee Resignation, That Employee will be on the list.</p>
  
  <p>e.g.: <code>Employee Name</code> <code>Resigned-Date</code></p>
  
  <pre><code>    Alexis Villar  2018/03/07
  </code></pre>
  
  <p>Then if the selected month on the select element is <code>May</code> which is <code>5</code> when you convert it onto a number and if the year is equal to <code>2018</code> then it must be hidden. but in my case, the employee is shown on the list. So now, this is my Stored Procedure.</p>
  
  <p>Code:</p>
  
  <pre><code>BEGIN
  SELECT  empID, badgenum, first_name, ISNULL(c.groupShortName,'') groupName, 
  ISNULL(b.statDesc, '') statDesc,  ISNULL(email,'') email, 
  ISNULL(contact_no,'') contact_no, a.resigned_date
  FROM userinfo a
  LEFT JOIN tblEmpStatus b on a.employment_status = b.statID
  LEFT JOIN tblGroup c on a.groupNo = c.groupID
  where a.employment_status IN (0,1) OR (a.employment_status = 2 and 
  MONTH(a.resigned_date) &lt;= 4  and year(a.resigned_date) &lt;= 2017)
  ORDER BY first_name ASC
  END
  </code></pre>
  
  <p>Can someone help me with this?</p>
  
  <p>Thanks in Advance!</p>
  
  <p>Regards,</p>