Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
---|---|---|
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 |
Table 2 :
NBL | NFACT | DATE FACT | AMOUNT FACT |
---|---|---|---|
BL1 | FACT1 | 30/01/2012 | 1 000 |
BL3 | FACT2 | 30/01/2012 | 3 000 |
BL4 | FACT3 | 30/01/2012 | 4 000 |
TABLE RESULT (Needed) :
NBL | DATE BL | AMOUNT BL |
---|---|---|
BL2 | 10/01/2012 | 2 000 |
BL5 | 14/01/2012 | 5 000 |
BL6 | 15/01/2012 | 6 000 |
Regards
Slim.
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;
You can use Load * from Table1
load * from Table 2 where not exists(NBL,NBL)
drop table table 1
Load
from table 2;
left join
load
from table1;
hope this helps
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)
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
not good.
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
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;
Many thanks, It is working fine.