Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ask a query where answer is < a certain time ,>a different time.

Status
Not open for further replies.

Pharmer

Technical User
Aug 15, 2002
13
US
I am managing a project where have to find out the number of occurances of an activity during our non-business hours. I am using imported text where one field list the times of occurences in 24hr time. The range is 00:00:01 to 23:59:59. The operational hours are 07:00 to 18:00. I can query all the times before (<07:00:00), and the time after (>18:00:00)- in 2 queries. I can also query &quot;>07:00:00,<18:00:00&quot; yielding the operational hour transaction, but the opposite (&quot;<07:00:00,>18:00:00) yields nothing. Help?
Douglas Ellis
 
Douglas,

Remember that the comma in QBE queries is the same as an AND. Thus, you're asking Paradox to locate all times that are less than 7:00 am *and* greater than 6:00 pm--which can't happen.

Use a two line query instead, with < 07:00:00 as the criteria for the first and > 18:00:00 as the criteria for the second.

Alternatively, use < 07:00:00 OR > 18:00:00 as a compound query.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top