TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abraham Olatubosun
NA
471
113k
Multiple Sql Statement Not Returning A Datatable
Jan 10 2017 7:57 AM
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
Reply
Answers (
5
)
how to compare given date and 1 day than current date
sql - database schema confusing.