Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HELP for join

Hello,

I Have two tables to load in order to get one table after loading them, how can i do for getting the result below ?

Table 1 :

NBL
DATE BL
AMOUNT BL
BL110/01/20121 000
BL210/01/20122 000
BL312/01/20123 000
BL413/01/20124 000
BL514/01/20125 000
BL615/01/20126 000

Table 2 :

NBL
NFACT
DATE FACT
AMOUNT FACT
BL1FACT130/01/20121 000
BL3FACT230/01/20123 000
BL4FACT330/01/20124 000

TABLE RESULT (Needed) :

NBL
DATE BL
AMOUNT BL
BL210/01/20122 000
BL514/01/20125 000
BL615/01/20126 000

Regards

Slim.

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

It should work as per sunil and vikram idea.

Ok try this, If is not working please attach sample file with data.

TAB1:

LOAD NBL,

     NFACT,

     [DATE FACT],

     [MT FACT]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is FACT)

TAB2:

LOAD NBL,

     [DATE BL],

     [MT BL]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is BL)

Where Not Exists(NBL,NBL)

;

Drop Table TAB1;

View solution in original post

8 Replies
Not applicable
Author

You can use Load * from Table1

load * from Table 2 where not exists(NBL,NBL)

drop table table 1

SunilChauhan
Champion II
Champion II

Load

from table 2;

left join

load

from table1;

hope this helps

Sunil Chauhan
Not applicable
Author

Not working, see below my original Script for loading please help me to correct it, to get the needed result.

TABLE1:

LOAD NBL,

     [DATE BL],

     [MT BL]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is BL);

 

TABLE2:

LOAD NBL,

     NFACT,

     [DATE FACT],

     [MT FACT]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is FACT)

SunilChauhan
Champion II
Champion II

what about this

TABLE2:

LOAD NBL,

     NFACT,

     [DATE FACT],

     [MT FACT]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is FACT)

left Join

TABLE1:

LOAD NBL,

     [DATE BL],

     [MT BL]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is BL);

hope this helps

Sunil Chauhan
Not applicable
Author

not good.

Not applicable
Author

hello, try this

tab1:

LOAD * INLINE [

    NBL, NFACT, DATEFACT, AMOUNTFACT

    BL1, FACT1, 30/01/2012, 1 000

    BL3, FACT2, 30/01/2012, 3 000

    BL4, FACT3, 30/01/2012, 4 000

];

tab2:

LOAD * INLINE [

    NBL, DATEBL, AMOUNTBL

    BL1, 10/01/2012, 1 000

    BL2, 10/01/2012, 2 000

    BL3, 12/01/2012, 3 000

    BL4, 13/01/2012, 4 000

    BL5, 14/01/2012, 5 000

    BL6, 15/01/2012, 6 000

] where not Exists(NBL,NBL);

DROP table tab1;

regards,

Salman

jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

It should work as per sunil and vikram idea.

Ok try this, If is not working please attach sample file with data.

TAB1:

LOAD NBL,

     NFACT,

     [DATE FACT],

     [MT FACT]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is FACT)

TAB2:

LOAD NBL,

     [DATE BL],

     [MT BL]

FROM

[..\BLFACT.xlsx] (ooxml, embedded labels, table is BL)

Where Not Exists(NBL,NBL)

;

Drop Table TAB1;

Not applicable
Author

Many thanks, It is working fine.