Query issues

pablotx

Registered User.
Local time
Today, 07:09
Joined
Feb 20, 2003
Messages
79
I am having trouble with a query. I have attached a simple version of a table for your perusal. I think the solution is relatively simple, but I don't know how to do it. What I want to do is this:

If a person has any stays of shorter than 3 days, I want the results to show their entire history regardless of the lengths. If the individual does not have any stays of 3 days or shorter, I want the results to skip them completely.

Please help. A detailed response will be beneficial as I really am a novice and need a step by step walkthrough.
 

Attachments

Try the below SQL in your db

SELECT Fake.*
FROM Fake
WHERE (((Fake.[Costumer ID]) In (Select [Costumer ID] from Fake where Length<3)));
 
Particular point you need to understand

stays of shorter than 3 days, and 3 days or shorter are different

This does affect the criteria in the sql

See query in attachment

L
 

Attachments

Thanks for the replies. Keith, your solution was dead on. Now I am trying to find out why it works.
 

Users who are viewing this thread

Back
Top Bottom