Formatting data in columns instead of rows

0

I have data where the SQL join is a 1 to many relationship.   The report output format looks like the first 2 sections below.  My users want to download the report into Excel to do analysis and want all the data for each data record to be in separate columns like my "Desired Output" below.   I have tried using crosstab but was not successful.  Is there a way to accomplish this?

 

First Record DataField1 DataField2 DataField3 DataField4 DataJoin1tag DataJoin1Field1 DataJoin1Field2 DataJoin1Field3          
          DataJoin1tag2 DataJoin2Field1 DataJoin2Field2 DataJoin2Field3          
          DataJoin1tag3 DataJoin3Field1 DataJoin3Field2 DataJoin3Field3          
          DataJoin1tag4 DataJoin4Field1 DataJoin4Field2 DataJoin4Field3          
Second Record DataField1 DataField2 DataField3 DataField4 DataJoin1tag DataJoin1Field1 DataJoin1Field2 DataJoin1Field3          
          DataJoin1tag2 DataJoin2Field1 DataJoin2Field2 DataJoin2Field3          
          DataJoin1tag3 DataJoin3Field1 DataJoin3Field2 DataJoin3Field3          
          DataJoin1tag4 DataJoin4Field1 DataJoin4Field2 DataJoin4Field3          
                           
Desired Output:                        
First Record DataField1 DataField2 DataField3 DataField4 DataJoin1tag Tag1 Field1 Tag1 Field2 Tag1 Field3 Tag2 Field1 Tag2 Field2 Tag2 Field3 Tag3 Field1 etc

  

James.Rogowski1's picture
Joined: Dec 23 2020 - 6:26am
Last seen: 2 days 4 hours ago

0 Answers:

No answers yet
Feedback