Jason,

I see what you mean.  Try adding an extra set of parentheses around each part  
(clause) OR (clause):

((((((( 'Arrival Time' - "1/1/1970")+3600) % 86400) >= (20 * 3600)) AND 
(((('Arrival Time' - "1/1/1970" )+3600) % 86400) < (24 * 3600))) AND 'Arrival 
Time' > "5/1/2012" AND 'Arrival Time' < "5/2/2012")) OR ((((((( 'Arrival Time' 
- "1/1/1970")+3600) % 86400) >= (0 * 3600)) AND (((('Arrival Time' - "1/1/1970" 
)+3600) % 86400) < (4 * 3600))) AND 'Arrival Time' > "5/2/2012" AND 'Arrival 
Time' < "5/3/2012"))

David

David Durling
University of Georgia


From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Jason Miller
Sent: Wednesday, November 07, 2012 5:03 PM
To: arslist@ARSLIST.ORG
Subject: Query for tickets between 8 PM and 4 AM the following day

** I am trying to run a quick and dirty search of tickets submitted from 8 PM 
and 4 AM the following day.  I using this query:

(((((( 'Arrival Time' - "1/1/1970")+3600) % 86400) >= (20 * 3600)) AND 
(((('Arrival Time' - "1/1/1970" )+3600) % 86400) < (24 * 3600))) AND 'Arrival 
Time' > "5/1/2012" AND 'Arrival Time' < "5/2/2012") OR (((((( 'Arrival Time' - 
"1/1/1970")+3600) % 86400) >= (0 * 3600)) AND (((('Arrival Time' - "1/1/1970" 
)+3600) % 86400) < (4 * 3600))) AND 'Arrival Time' > "5/2/2012" AND 'Arrival 
Time' < "5/3/2012")

I broke it down into two parts. To the left of the OR finds 8 PM to midnight 
and to the right of the OR finds midnight to 4 AM of the following day.  When I 
run each half separate it returns the expected results.  When I combine the two 
with the OR I only get results for the half (8 to midnight).

I am sure I am missing something simple.  Maybe it is time for some afternoon 
coffee?  Does anybody see my mistake?

Thanks,
Jason
_attend WWRUG12 www.wwrug.com<http://www.wwrug.com> ARSlist: "Where the Answers 
Are"_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

Reply via email to