Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've a data set in the following format
Data set
Response question answer
1 1 Name 1
1 2 Yes
2 1 Name 2
2 2 No
3 1 Name 3
3 2 Yes
I want to create a table as shown below -
Response Names Yes / No
1 Name 1 Yes
2 Name 2 No
3 Name 3 Yes
Can someone please help?
You should use a Generic Load. See The Generic Load
HIC
Thank you.
Is there another way to do this using functions.
You could do it like this - but I guess it is much less efficient than doing a GENERIC LOAD - the benefit is that you get a single table immediately:
[Data set]:
LOAD * INLINE [
Response question answer
1 1 Name 1
1 2 Yes
2 1 Name 2
2 2 No
3 1 Name 3
3 2 Yes
] (delimiter is \t);
[Result Table 1]:
LOAD Response AS Response#,
SubField( answer , '|' , 1 ) AS Names,
SubField( answer , '|' , 2 ) AS [Yes / No];
LOAD
Response,
Concat( answer , '|' ) AS answer
RESIDENT
[Data set]
GROUP BY
Response;
DROP TABLE [Data set];
Hi Henric, I beg your pardon to to try to get you by this way, but I have an unsolved issue depicted in this ticket. I am not satisfied with the solution found it.
May you please see this. Thanks at all.