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

Load script question

Hi,

I have a data set like this

First table:

ItemidItemAmountAddr
1Item 030FA
2Item130CA
3Item289
4Item389

Second table:

Item IDAddr
3QA
4

C2

I need to merge these tables in the load script so it can fill addr column of First table with the missing value.

Output table:

ItemidItemAmountAddr
1Item 030FA
2Item130CA
3Item289QA
4Item389C2

What would be the most efficient way to do it?

Thanks

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

Use Mapping Load!

Map:

Mapping Load

        [Item ID] as Itemid,

        Addr

FROM [https://community.qlik.com/thread/302853]

(html, codepage is 1252, embedded labels, table is @2);

Final:

LOAD    Itemid,

        Item,

        Amount,

        if(Addr='',ApplyMap('Map',Itemid),Addr) as Addr

FROM [https://community.qlik.com/thread/302853]

(html, codepage is 1252, embedded labels, table is @1) ;

hope this helps

View solution in original post

2 Replies
Frank_Hartmann
Master II
Master II

Use Mapping Load!

Map:

Mapping Load

        [Item ID] as Itemid,

        Addr

FROM [https://community.qlik.com/thread/302853]

(html, codepage is 1252, embedded labels, table is @2);

Final:

LOAD    Itemid,

        Item,

        Amount,

        if(Addr='',ApplyMap('Map',Itemid),Addr) as Addr

FROM [https://community.qlik.com/thread/302853]

(html, codepage is 1252, embedded labels, table is @1) ;

hope this helps

jduluc12
Creator
Creator
Author

I had to rename the field else it worked fine.

Thanks