I am trying to create a query to combine the following information:
FileID ErrorCode ErrorDesc ErrorCount
1 4 Bad File Name 3
2 6 Bad File Code 56
3 4 Bad File Name 2
3 12 Line Length Invalid 3
3 17 Missing Req Fields 150
I want to combine all rows based on the FileID
so that all information for a given FileID
would appear on the same line as the following:
1 4 Bad File Name 3
2 6 Bad File Code 56
3 4 Bad File Name 2 12 Line Length Invalid 3 17 Missing Req Fields 150
The problem I am running it to there will be an unknown amount of errors per given file. It could have 1-50 errors and I would like to combine all of that information under one row. I am not sure if this is possible or if there is another way to look at this issue. My end goal is to end up creating a report off of this data. Thanks!
A little more involved than Mikael's - the main difference is that columns are maintained here (however the columns for each error code other than the first "line up").
Setup:
Code:
Clean-up: