Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transform Table

Hi, I need convert the table1 in the table2 in script, can help me please

Tabla1:
IDnamekeySec
1A1AS
1A1AK
3C3CS
3C3CK
4D4DK




Tabla2:
IDnamekeySec
1A1AK1AS
3C3CK3CS
4D4DK

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this:

KEYSEC:

LOAD * INLINE [

ID,          name,          key,          Sec

1,          A,                    ,1AS

1,          A,          1AK,

3,          C,                    ,3CS

3,          C,          3CK,

4,          D,          4DK,

];

 

NOCONCATENATE LOAD

ID, name,

maxstring(key) as key,

maxstring(Sec) as Sec

Resident KEYSEC group by ID,name;

drop table KEYSEC;

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like this:

KEYSEC:

LOAD * INLINE [

ID,          name,          key,          Sec

1,          A,                    ,1AS

1,          A,          1AK,

3,          C,                    ,3CS

3,          C,          3CK,

4,          D,          4DK,

];

 

NOCONCATENATE LOAD

ID, name,

maxstring(key) as key,

maxstring(Sec) as Sec

Resident KEYSEC group by ID,name;

drop table KEYSEC;

Not applicable
Author

Thanks a lot swuehl.