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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble creating a query

Status
Not open for further replies.

Scorez2000

Programmer
Feb 5, 2004
87
GB
I'll start by describing the system. I have two tables. The first one is a directory of users which has firstname, last name, phone number and password.

The second table has callid, number called, duration, cost and assignment.

Assignment is a field which will consisit of one of three values: Personal, Business or Null. If it is set at null, it means the person has not marked that call as either personal or business.

The tables obviously have a 1-to-many relationship. In that, a person can make many calls, but each call can only be made by one person.

I need to run a query that retrieves all users that still have outstanding calls that have not been marked as business or personal. Does anyone know how to do this?

Thanks in advance.

Wayne.
 
Apologies. That is wrong. I need back a list of users who have marked ALL of THEIR calls as personal/business. i.e. they have no remaining calls left to mark.
 
First you need a field in each table to "link" the two records together.



_______
I love small animals, especially with a good brown gravy....
 
Sorry, that's in there already.
I actually worked out. A simple SELECT DISTINCT WHERE ASSIGNMENT IS NULL.

Sorted.

Thanks anyway. Sorry for clogging up the forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top