Move record data to multiple columns

  • Thread starter Thread starter gjoverto
  • Start date Start date
G

gjoverto

I need some help with a transform. My data looks like this:

Doc_ID Person_ID Contact_Type
1 A JR
2 B NP
2 B KP
2 B JE

I need to transform it to:

Doc_ID Person_ID Contact1_Type Contact2_Type Contact3_Type
1 A JR
2 B NP KP
JE

Any help is appreciated.
 
Create a crosstab query and it should give you results similar to what you
want. In SQL it's a Transform statement.
 
Thanks for the reply. I tried that, but it's not quite what I need. I have
4 Contactx_Type columns (e.g. Contact1_Type, Contact2_Type, etc.). I need to
put the first occuring Contact_type and place it in the Contact1_Type column,
the second occuring Contact_type into Contact2_Type, etc. I'm not sure a
query will do this.
 
Back
Top