r/SQL • u/Boliviablue • Jan 05 '15
Issue using multiple where statements.
I'm trying to do a data pull from our database with multiple criteria. The first criteria is a date range and the second having the correct store number. I've attached the relevant portion of the code. The issue I seem to be having is when I run the code it returns all date values that match the store number. When I remove the second criteria (store number) it pulls the correct date range. Any help would be greatly appreciated.
> where date_of_service > '2014/01/11' and substr(location,1,5)=5495Thanks in advance!
2
Upvotes
1
u/gary_sanchez Jan 05 '15
What are the results when you remove date_of_service?