Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
FrankGrimm
Partner - Creator
Partner - Creator

load unkown field

Hello together,

 

i have different tables with a fix part of fieldnames and a variable part of fieldnames.

I load this diffent tables with an concatenate statement.

So i get a big table with the fix part and the complete variable part.

Example:

Table1:

SN, USER, PART1

Tabel2:

SN,USER,PART2

Table3:

SN,USER,PART3

TABLE4:

SN,USER,PART2

In real i don´t now whats the name of the variable field (PARTX), but i want to load all the variable content into the field "ALL_PART"

I only have a list of the possible fieldnames.

If i would know the name of the variable fields, i could do:

load 

SN,

USER,

if(len(PART1)<>0,PART1,
    if(len(PART2)<>0,PART2,
         if(len(PART3)<>0,PART3,'N.A'))) as ALL_PART

resindent.......

 

How can i use the list opf the possible field-names to deside which name i use in the load-script?

Thanks a lot!

 

 

 

Labels (1)
2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you know the names of the possible fields, you can use the ALIAS statement. For example:

Alias PART1 as ALL_PART;
Alias PART2 as ALL_PART;
Alias PART3 as ALL_PART;

Facts:
LOAD * Inline [

USER, SN, PART1
a, 5, zz
];
Concatenate (Facts)
LOAD * Inline [

USER, SN, PART2
b, 12, yy
]; 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

SerhanKaraer
Creator III
Creator III

Hello Frank,

You can use Alias fields before loading those tables as below, thus all your tables will be concatenated supposing the table definitions are same:

Alias PART1 as ALL_PART, PART2 as ALL_PART, PART3 as ALL_PART;

Table1:

SN, USER, PART1

Tabel2:

SN,USER,PART2

Table3:

SN,USER,PART3

TABLE4:

SN,USER,PART2

 

I hope it solves.

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you know the names of the possible fields, you can use the ALIAS statement. For example:

Alias PART1 as ALL_PART;
Alias PART2 as ALL_PART;
Alias PART3 as ALL_PART;

Facts:
LOAD * Inline [

USER, SN, PART1
a, 5, zz
];
Concatenate (Facts)
LOAD * Inline [

USER, SN, PART2
b, 12, yy
]; 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

SerhanKaraer
Creator III
Creator III

Hello Frank,

You can use Alias fields before loading those tables as below, thus all your tables will be concatenated supposing the table definitions are same:

Alias PART1 as ALL_PART, PART2 as ALL_PART, PART3 as ALL_PART;

Table1:

SN, USER, PART1

Tabel2:

SN,USER,PART2

Table3:

SN,USER,PART3

TABLE4:

SN,USER,PART2

 

I hope it solves.