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

How to create this PIVOT table?

Status
Not open for further replies.

uticket

IS-IT--Management
Jun 1, 2004
37
US
Hi, I have a table in following format

School_ID Student_ID Visit_Date Visit_Number
10 2 July 01, 2003 1
10 2 July 10, 2003 2
11 5 May 5, 2003 1
11 5 June 15 2003 2
.......

As there are only two possible visit number: 1 or 2, I would like to turn above table into following format:

School_ID Student_ID Visit_1_Date Visit_2_Date
10 2 July 01, 2003 July 10, 2003
11 5 May 5, 2003 June 15, 2003

The new table will help me calculate the average dates between visit 1 and visit 2 for every school.

It seems it is much more difficult than I had expected.
Is it really so tough?

Thanks!
 
Can ant yone let me know if it is tough to create this PIVOT table?

Thanks!
 
you will get more reponse in a specific forum (rather than the general database discussion). I'm going to guess that you are using Access so, maybe:

Forum701
Forum181
Forum700

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top