Dear Code Masters,
I believe all of you are doing fine, i have a SQL challenge kindly view the image below

what i want to achieve is the SQL statement that will use "Select " Statement to read the table for State, LGA, Facility Name, Month1, Month2, Year Range Year1 to Year2 and Thematic Area.
i have tried the following statement "Select * from VW_ART WHERE states='Enugu' and lga ='Udi' and Facname ='Udi Districts Hospital' AND years = '2015' OR (years= '2016' and months IN ('January' , 'December')) "
Which is not returning any records and the records are present but when i make the Year 2016 both it work
Then if i state Months say from April to May 2016 for both, i expect two months it will display all the records in the data base.
Kindly assist me with thanks


Vignesh ManiRank #98 · 22.1K reputationPosted Jan 10, 2017, 3:25 AM EST
Abraham OlatubosunRank #2,749 · 510 reputationPosted Jan 10, 2017, 4:17 AM EST
Midhun TpRank #388 · 6.5K reputationPosted Jan 10, 2017, 7:49 PM EST
Abraham OlatubosunRank #2,749 · 510 reputationPosted Jan 10, 2017, 9:22 PM EST
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Jan 10, 2017, 11:18 PM EST