Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Why am I getting this result from this search query?

The sql is:

lect * from calendar where description LIKE '%investigation%' or short_name LIKE '%investigation%' AND date>='2015-08-20' AND date<='2015-08-22' group by event_id order by date

The result I get is an event that happened from 2015-06-30 to 2017-07-08. Seems like that wouldn't be a viable "return" on the above statement in that I've qualified the range of dates to be between August 20th and August 22nd.

What am I doing wrong?
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

How do you know the event took place between 2015-06-30 and 2017-07-08?
You only have one date field in your query.
ASKER CERTIFIED SOLUTION
Avatar of Francisco Igor
Francisco Igor
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial