I have a table named TableA, as below;
+----+---------------+--------------+--------------+ | Id | Frequency | Inserted_Date| Eligibility | +----+---------------+--------------+--------------+ | 1 | Halfyearly | 23/8/2013 | | | 2 | Quaterly | 24/11/2013 | | +----+---------------+--------------+--------------+
Here Eligibility column is initially empty.I need to write a query where Eligibility is set to be yes /no based on the frequency for current month.
for 1st record, as of today Eligibility=No
for 2nd record, as of today Eligibility=Yes
+----+---------------+--------------+--------------+ | Id | Frequency | Date |Inserted_Date | Eligibilility|Eligibility| +----+---------------+--------------+--------------+ | 1 | Halfyearly | 23/8/2013 | No | | 2 | Quaterly | 24/11/2013 | Yes | +----+---------------+--------------+--------------+
I have no idea how to write a query for getting the above output and more over i need to change it for every month.
Please help me out.
Thank you all in advance for your response.