Combining Multiple Records into a Single Record

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
 
R

Rick B

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.
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top