Denormalizing a database
I have been going crazy trying to figure this out and just cant, Im sure the answer is staring me in the face but when I think too much on something I gety stuck.
I have 2 tables, one for VISITS and the other CPT CODES they have a one to many relationship.
Visit_ID ----- CPT_ID
so there can be multiple records with CPT_ID = 123 related to Visit_ID 22 (these are displayed through a portal)
I have been asked to export data from both tables into a Tab delimited file, in the following format:
Fname, LName, DOB, ID, CPT1, CPT2, CPT3... CPT6. all in a single record. Whats the easiet way for me to put this together?
Thanks for any help.