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

Concatenate two tables and just replacing a specified column

Hello Experts,

I am starting to learn concatenate function in Qlikview and I want to replace column f2 from table 2 into table 1

so the intended result as the following table:

f1f2f3
aac4
bbc5
cbc6
dbc2
ecc3

table2:

f1f2f3
aac1
dbc2
ecc3

table1:

f1f2f3
abc4
bbc5
cb

c6

I used the code below and the result table turn out to be this:

f1f2f3
aac1
abc4
bbc5
cbc6
dbc2
ecc3

LOAD f1,

     f2,

     f3

FROM

C:\table1.xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate

LOAD f1,

     f2,

     f3

FROM

C:\table2.xlsx

(ooxml, embedded labels, table is Sheet1);

PLEASE HELP!!! THANKS IN ADVANCE!!

14 Replies
tresesco
MVP
MVP

Try something like:

LOAD f1,

     f2,

     f3

FROM

C:\table1.xlsx

(ooxml, embedded labels, table is Sheet1);

LOAD f1,

     f2,

     f3

FROM

C:\table2.xlsx

(ooxml, embedded labels, table is Sheet1)  where not exists(f1);  

Not applicable
Author

hi

try this code.

table2:

LOAD * Inline [

f1,    f2,    f3

a,    a,    c1

d,    b,    c2

e,    c,    c3

]   ;

Join

table1:

LOAD * Inline [

f1,    f2,    f3

a,    b,    c4

b,    b,    c5

c,    b, c6] Where not Exists(f1);


then output like this

f1f2f3
aac1
bbc5
cbc6
dbc2
ecc3

see attached file.

nizamsha
Specialist II
Specialist II

table2:

LOAD * Inline [

f1, f2, f3

a, a, c1

d ,b, c2

e ,c, c3

];

table1:

LOAD * Inline [

f1 ,f2, f3

a ,b ,c4

b ,b, c5

c ,b ,c6

]  where not exists(f1);

sujeetsingh
Master III
Master III

It seems some time the user posting the issue just forget to mention what is right and helpful.

Not applicable
Author

Hello Dear,

Using when not exists(f1) statement in the end I get this table:

f1f2f3
abc4
bbc5
cbc6
dbc2
ecc3

which is not the one I am hoping to get...

I want to get this result:

f1f2f3
aac4
bbc5
cbc6
dbc2
ecc3
Not applicable
Author

Hello Dear,

Using when not exists(f1) statement in the end I get this table:

f1f2f3
abc4
bbc5
cbc6
dbc2
ecc3

which is not the one I am hoping to get...

I want to get this result:

f1f2f3
aac4
bbc5
cbc6
dbc2
ecc3
Not applicable
Author

f1f2f3
aac4
bbc5
cbc6
dbc2
ecc3

Thanks for the help, but this is the table I was trying to get...

PLEASE HELP!!

nizamsha
Specialist II
Specialist II

LOAD * Inline [

f1, f2, f3

a, a, c1

d ,b, c2

e ,c, c3

] where not exists(f1);

table1:

LOAD * Inline [

f1 ,f2, f3

a ,b ,c4

b ,b, c5

c ,b ,c6

]  ;

tresesco
MVP
MVP


Then Try:

LOAD f1,

     f2,

     f3

FROM

C:\table2.xlsx

(ooxml, embedded labels, table is Sheet1) ;  

LOAD f1,

     f2,

     f3

FROM

C:\table1.xlsx

(ooxml, embedded labels, table is Sheet1)  where not exists(f1);