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

Summary of previous registrations 1

Status
Not open for further replies.

vanleurth

Programmer
Sep 1, 2001
156
US
Hello SQL experts,

I have a registration table for all the people that have taken certain trainings. some of these registrations have the same training name for a group of people that attended in a specific date. The training might have been given to the same people for the last 5 years every year.

Now, I'm trying to come up with a history form that will show only when the trainings have been offered with repeating the information;
for example;

training01 5/12/03
training01 5/12/02
training01 5/12/03
training02 5/12/03

instead of

training01 5/12/03 John
training01 5/12/03 Jack
training01 5/12/02 John
training01 5/12/02 Jack
training02 5/12/03 John
training02 5/12/03 Jack
training02 5/12/03 Martha
training02 5/12/03 Ross

I tried to use the same table as part of my inner join but I don't know how to link it so it will give the described information.

Thanks in advance,
V.
 
You don't tell us how the table(s) are design, but if everything is in one table tTable with fields training, date (and name) this will do what you want.

SELECT DISTINCT training, date from tTable
 
I don't think he is after distinct. From
"
training01 5/12/03
training01 5/12/02
training01 5/12/03
training02 5/12/03
"

"training01 5/12/03" is repeated so I think he wants the duplicates for some reason.

Vanleurth what do you want ?


Regards
Warwick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top