INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Confused - unique records query

Confused - unique records query

(OP)
Hello,

I have a table called [works]

The table contains the following fields that I am interested in:

1. Date
2. CompanyName
3. Job
4. Amount
5. EmailAdd


The table has many records per day, often with 10 or more from the same Company . To be clear I have not set up the table, so do not want to alter it - the CompanyName is the unique id.

I need to be able to create a query which does the following:

1. Looks at all the records over the last 7 days
2. Shows the CompanyName if in those records (but only once - not repeated)
3. Shows the EmailAdd


Can I do this all in one query or do I need several queries?

Many thanks Mark

RE: Confused - unique records query

HI,

Select Distinct CompanyName, EmailAdd
From [works]
Where [Date] >= Date() - 7

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close