PC Review


Reply
Thread Tools Rate Thread

Combine multiple rows into one row with multiple columns

 
 
Elysia Larson
Guest
Posts: n/a
 
      8th Jan 2010
Hi,

I have a table set up so that there are three columns: StudyID,
DrawDate, and Value. StudyID and DrawDate are the primary key. I
want to create a table from this one that has only one row for each
StudyID so that it would go from:

StudyID DrawDate Value

to

StudyID DrawDate1 Value1 DrawDate2 Value2 DrawDate3
Value3 etc.

Is there a way to do this?

Thanks,

Elysia
 
Reply With Quote
 
 
 
 
PvdG42
Guest
Posts: n/a
 
      8th Jan 2010

"Elysia Larson" <(E-Mail Removed)> wrote in message
news:832e952f-174f-489f-ab7a-(E-Mail Removed)...
> Hi,
>
> I have a table set up so that there are three columns: StudyID,
> DrawDate, and Value. StudyID and DrawDate are the primary key. I
> want to create a table from this one that has only one row for each
> StudyID so that it would go from:
>
> StudyID DrawDate Value
>
> to
>
> StudyID DrawDate1 Value1 DrawDate2 Value2 DrawDate3
> Value3 etc.
>
> Is there a way to do this?
>
> Thanks,
>
> Elysia


How many DrawDate fields will be needed per record? You are denormalizing
your data, and it will probably cause problems in the long run. If you have
multiple DrawDates associated with a single StudyID, you need a one-to-many
relationship between two tables to represent that relationship.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine data from multiple rows onto one row in separate columns Balbina Microsoft Access 5 6th Jan 2010 11:22 PM
Combine multiple columns and rows for one record into one row. Bowtie63 Microsoft Excel Misc 2 16th Feb 2008 04:20 AM
Combine multiple columns into two long columns, Repeating rows in first column anasab@gmail.com Microsoft Excel Misc 2 31st Jul 2006 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column anasab@gmail.com Microsoft Excel Misc 0 31st Jul 2006 05:07 PM
SQL to combine columns of multiple rows into one row =?Utf-8?B?cmxn?= Microsoft Access Queries 9 13th Jun 2006 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:28 PM.