mbentley
Registered User.
- Local time
- Yesterday, 19:19
- Joined
- Feb 1, 2002
- Messages
- 138
I have a two tables, one that stores basic customer information and one that stores orders which are linked to customers in the main table in a one-to-many relationship. Pretty standard.
What I need to be able to is have a query look at all the orders for each customer and find out if an order was ever cancelled by that customer after a given date. The result would be a query that has two columns; one with the customer ID and one that says "Cancelled" or "Not Cancelled" for each customer (not stored in the underlying table, just part of the query).
Can anyone help me with this?
I should clarify that the sequence of the Cancelled order is important. For example, if a customer places 4 orders and cancels the third, the query would return 4 records for that customer. The first 2 would say "Not Cancelled" and the last 2 would say "Cancelled".
Don't ask me why I need to do this. The explanation is way too long. Suffice it to say that I have to.
What I need to be able to is have a query look at all the orders for each customer and find out if an order was ever cancelled by that customer after a given date. The result would be a query that has two columns; one with the customer ID and one that says "Cancelled" or "Not Cancelled" for each customer (not stored in the underlying table, just part of the query).
Can anyone help me with this?
I should clarify that the sequence of the Cancelled order is important. For example, if a customer places 4 orders and cancels the third, the query would return 4 records for that customer. The first 2 would say "Not Cancelled" and the last 2 would say "Cancelled".
Don't ask me why I need to do this. The explanation is way too long. Suffice it to say that I have to.
Last edited: