Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a problem with my Skripting.
I join two Tables to one.
But I want only the elements, where the [Object-ID] is not included in Table1
Aufgaben:
LOAD [Object-ID],
a,
b
FROM
[..\10_Data\test.xlsx]
(ooxml, embedded labels, table is Aufgaben);
join load distinct
[Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd] where ...............
(qvd);
I hope someone can help me.
Alex
Try this script it will work
Aufgaben:
LOAD [Object-ID],
a,
b
FROM
Table1
(ooxml, embedded labels, table is Aufgaben);
[Object-ID],
a,
b
FROM
table2
where not exists([Object-ID];
Add this line of code:
where not exists([Object-ID]
to the 2nd load statement.
So the 2nd load statement turns into this:
join load distinct
[Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd]
where not exists([Object-ID]
(qvd);
Unfortunately it does not work:
Script Error:
Error opening file '..\30_QVDs\Aufgaben.qvd where not exists [Object-ID' The system cannot find the file specified.
join load distinct
[Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd] where not exists [Object-ID]
(qvd);
Are you sure you need join, all your field names in both the tables are same, you may want to use concatenate.
Hi,
You can also try this script,
Table1:
LOAD [Object-ID],
a,
b
FROM
[..\10_Data\test.xlsx]
(ooxml, embedded labels, table is Aufgaben);
Concatenate
Table2:
LOAD [Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd] where ...............
(qvd);
Try like this
Aufgaben:
LOAD [Object-ID],
a,
b
FROM
[..\10_Data\test.xlsx]
(ooxml, embedded labels, table is Aufgaben);
[Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd]
where not exists([Object-ID];
// since both the tables have similar columns it will automatically gets concatenated
Thanks. You are all right. But my problem is not to connect the two tables.
I like only the elements where the Object-ID is NOT in the first Table.
Example:
Table1
Object-ID | a | b |
---|---|---|
1 | a | a |
2 | b | b |
3 | c | c |
4 | d | d |
5 | e | e |
Table2
Object-ID | a | b |
---|---|---|
2 | x | y |
7 | g | g |
1 | a | ttt |
the result should look like this:
Object-ID | a | b |
---|---|---|
1 | a | a |
2 | b | b |
3 | c | c |
4 | d | d |
5 | e | e |
7 | g | g |
join load distinct
[Object-ID],
a,
b
FROM
[..\30_QVDs\Aufgaben.qvd]
(qvd)
where not exists([Object-ID])
;
Try this script it will work
Aufgaben:
LOAD [Object-ID],
a,
b
FROM
Table1
(ooxml, embedded labels, table is Aufgaben);
[Object-ID],
a,
b
FROM
table2
where not exists([Object-ID];
Question:
Do you want to JOIN or CONCATENATE?