I have 3 sql inputs that are unioned, sorted by OrdNum & Position then output to csv (no header row). The example below is a simplified version of my data.
The csv needs to have a specific number of fields per row. Current output and required output is shown.
Example:
Any row with Position=1 would have 4 fields (field1-field4) Any of the 4 fields could be blank or contain data
Any row with Position=2 would have 6 fields (field1-field6) Any of the 6 fields could be blank or contain data
Any row with Position=3 would have 3 fields (field1-field3) Any of the 3 fields could be blank or contain data
In the image below I indicate the fields that need to be removed by {XXX}. I could hard code that in if that gives a possible solution.
Any thoughts would be appreciated.
Stapuff
