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

Confused - unique records query 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
579
0
16
GB
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
 
HI,

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

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top