Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two tables with following fields:
Table1: URL, bandwidth_up, bandwidth_down
Table2: URL
The URL's in Table2 can all be found in Table1. Moreover, Table1 got several URL's that are not in the point of interest.
The information I need is: How much bandwith_up and *_down is used by the URL's that can be found in Table2
Or if I ask in another way: How can I get rid of the URL's in Table1, that can not be found in Table2.
I do not know which way is more "elegant" and easier to implement.
hello,
You can use JOIN or Exists checking:
1) JOIN approach:
LOAD URL FROM Table2;
LEFT JOIN
LOAD * FROM Table1;
2) Exists approach:
tmpTable:
LOAD URL as URLForCheck FROM Table2;
LOAD * FROM Table1
WHERE Exists( URLForCheck, URL);
DROP TABLE tmpTable;
hello,
You can use JOIN or Exists checking:
1) JOIN approach:
LOAD URL FROM Table2;
LEFT JOIN
LOAD * FROM Table1;
2) Exists approach:
tmpTable:
LOAD URL as URLForCheck FROM Table2;
LOAD * FROM Table1
WHERE Exists( URLForCheck, URL);
DROP TABLE tmpTable;
the exist solution works fine for me.
Tank you!