Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
krisslax
Contributor II
Contributor II

Script Load

I have a table that details a list of individuals and the date they completed various courses on and I'm struggling to find a solution to what I need to complete.

The table is like this:

Name   Course1             Course2              Course3

Joe        01/01/2022      01/02/2022        01/03/2022

Jane      08/01/2022     03/02/2022         01/03/2022

 

The problem is that new courses are added regularly so the course list (and therefore the number of columns) increases as time passes and all have a name which isn't sequential in any way.  So course 1 could be "MS Office Excel", Course 2 could be "Forklift" and a new course being added could be "Manual Handling" for example.

What I'd like to do is get the results in this format:

Name      Course            Date

Joe           Course1          01/01/2022     

Joe           Course2          01/02/2022

Joe           Course3          01/03/2022

Jane        Course1          08/01/2022     

Jane        Course2          03/02/2022

Jane        Course3          01/03/2022

 

I can't specify the course names in the load script as I don't know what the new ones will be called or I'd have to change the load script for every new course.  If there's a way of doing this in the load, or via set analysis, I'm just so deep into trying things I've baffled myself and can't see the wood for the trees.

Hope that makes sense.

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Have a look at using Crosstable load:

Crosstable(Course,Date) Load * INLINE [
Name, Course1, Course2, Course3
Joe, 01/01/2022, 01/02/2022, 01/03/2022
Jane, 08/01/2022, 03/02/2022, 01/03/2022
];

 

View solution in original post

2 Replies
Or
MVP
MVP

Have a look at using Crosstable load:

Crosstable(Course,Date) Load * INLINE [
Name, Course1, Course2, Course3
Joe, 01/01/2022, 01/02/2022, 01/03/2022
Jane, 08/01/2022, 03/02/2022, 01/03/2022
];

 

krisslax
Contributor II
Contributor II
Author

Thank you so much, that's worked first time, I don't know how I missed this in all the research I've been doing, thank you very much.