Combining Multiple Records into a Single Record

  • Thread starter Thread starter Jkay
  • Start date Start date
J

Jkay

I have inherited a database that has previously been designed by
someone else.

Example:

ID NAME SCR_DT SESS_DT
11 Jane Doe 12/1/2005 12/5/2005
11 Jane Doe 12/1/2005 12/7/2005
12 Kate Smitm 12/13/2005 12/14/2005
11 Jane Doe 12/1/2005 12/9/2005
12 Kate Smith 12/13/2005 12/20/2005
13 Mary Not 12/13/2005 12/13/2005

To look like this:

ID NAME SCR_DT SESS_DT1 SESS_DT2 SESS_DT 3
11 Jane Doe 12/1/2005 12/5/2005 12/7/2005 12/9/2005
12 Kate Smith 12/13/2005 12/14/2005 12/20/2005
13 Mary Not 12/13/2005 12/13/2005

Any suggestions would be much appreciated!
Jennifer
 
The current design of the data is "normalized". Your idea would violate
normalized database design. You are trying to take a well-written design
and mess it up.

That being said, you can create a report that looks like you want, but I
would not recommend modifying the design of the actual tables or the data in
them. How to do this in a report is asked almost every day in the Reports
newsgroup. Do a some searches out there and you should find tons of threads
on the topic.
 
Actually, I don't think the Table is correctly normalized, anyway.

Look at the Columns [ID] and [Name]. It seems to me that [ID] is very much
related to [Name] in this Table, i.e. [Name] is dependent on a ForeignKey
[ID] and not a PK. The Table may not have a PK either.

The other 2 columns look suspicious to me also.
 
Back
Top