As400 Help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

pea333nut

Thread Starter
Joined
Sep 1, 2004
Messages
19
I need to make a query that that will show all of the customers that an employee in the last year. I set the date greater than 4-01-03 and the employeeNum = to thier number. I get all of the customers that the employee had in the last year but I get duplicates. How do I make it so I only get 1 customer and no duplicates.

Thanks
 
Joined
Jul 29, 2001
Messages
21,334
YOu need to add grouping to your query. It will always bring in duplicates the way you made your query because most have probably had more than one customer in that time frame.
 

pea333nut

Thread Starter
Joined
Sep 1, 2004
Messages
19
What query definition is this under. This is on an AS400 not SQL or something else.
 
Joined
Jul 29, 2001
Messages
21,334
Hey, you tell me! SQL is pretty much SQL anywhere you go with minor syntax differences. What database are you running?
 

pea333nut

Thread Starter
Joined
Sep 1, 2004
Messages
19
I'm just not sure what option to go into to write a statement like the one you supplied. Attached is a print screen. Can you tell me where I would go to write that kind of query statement.

Thank you very much
 

Attachments

Joined
Jul 29, 2001
Messages
21,334
You still have not told anyone what type of database or program this is. A little infirmation like that would go a long way in helping you out.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top