Jacob
2010-02-10 13:21:32 UTC
Hi
I have a problem with a very large dataset containing information on
blood samples acquired at different dates/times in 4500 patients. As
more samples are provided per patient the total number of entries is
apprx. 14000.
What I need to do is to join information from multiple rows with the
same unique identifier into one "case" with information on all
samples. I need to do this in order to merge the information with
another dataset with cases identified by the same unique ID.
Example:
What I have:
ID Result Sample date
010160 1.3 010209 12.30
010160 2.9 010209 22:30
150347 0.9 130909 15:00
150347 0.8 130909 23:45
200820 3.2 310809 09:30
200820 4.1 310809 18:00
What I need:
ID Result1 Sample date1 Result2 Sample date2
010160 1.3 010209 12.30 2.9 010209 22:30
150347 0.9 130909 15:00 0.8 130909 23:45
200820 3.2 310809 09:30 4.1 310809 18:00
Each patient can have from 1 to 12 blood samples drawn over the course
of a year.
Can someone please help?
Thank you!
Jacob Sorensen
I have a problem with a very large dataset containing information on
blood samples acquired at different dates/times in 4500 patients. As
more samples are provided per patient the total number of entries is
apprx. 14000.
What I need to do is to join information from multiple rows with the
same unique identifier into one "case" with information on all
samples. I need to do this in order to merge the information with
another dataset with cases identified by the same unique ID.
Example:
What I have:
ID Result Sample date
010160 1.3 010209 12.30
010160 2.9 010209 22:30
150347 0.9 130909 15:00
150347 0.8 130909 23:45
200820 3.2 310809 09:30
200820 4.1 310809 18:00
What I need:
ID Result1 Sample date1 Result2 Sample date2
010160 1.3 010209 12.30 2.9 010209 22:30
150347 0.9 130909 15:00 0.8 130909 23:45
200820 3.2 310809 09:30 4.1 310809 18:00
Each patient can have from 1 to 12 blood samples drawn over the course
of a year.
Can someone please help?
Thank you!
Jacob Sorensen