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!

iif statement

Status
Not open for further replies.

aarellano

MIS
Joined
Oct 22, 2007
Messages
168
Location
US
Hello,

I was asked to write a query that will give me the hours an employee worked on a specific job, I got that no problem.

Then I was asked to write a query for all the production on a certain date. I go that, no problme

My problem now is that I am asked to write a query that will tell me the hours an employee worked on a job and the production the employee made. The proplem is that multiple employees can work on the same order and sub order, just the quantities are the difference

Unfortunatelly I have nothing that ties the employee to the production so the data looks something like this:
Code:
19816	6400	11	0.6	340
19816	6400	11	0.6	340
19892	6400	11	8.03	374
19892	6400	11	8.03	374
I get multiple entries and I would like to get something like this
Code:
19816	6400	11	0.6	340
19892	6400	11	8.03	374

I was trying to do an if statement but was not really sure how to phrase it

any help is greatly appreciated
 
Select Distict"?

I am not familiar with that one could you explain a bit more?
 
Could you share your current SQL view of your query? Most SQL statements begin with [blue]SELECT ... [/blue]. If you change this to [blue]SELECT DISTINCT ... [/blue] you will get only distinct values in your query. The results are much the same as changing your query to a totals query.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top