Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I have two tables with same column name
Table 1:
Load * Inline [
A,
1,
2,
3,
4,
5,
6];
Table 2:
Load * Inline[
A,
1,
2,
3,
4,
5,
7];
I want a solution which returns me 7 as the answer.
I tried this
Load * from Table1;
right Join
load* from table2
where not exists(A);
but when i reload this script of mine , its reloading perfectly but not fetching 0 rows .
Thanking everyone in anticipation
Hi swuehl,
My actual data is some thing like this
GROUP_ID
GROUP1
GROUP1A
GROUP2
GROUP2A
GROUP3
GROUP4
GROUP5
GROUP17
THE SECOND TABLE
[GROUP ID *]
1
1A
2
2A
3
4
5
20
I HAVE USED MID(GROUP_ID,6) TO GET ONLY 1, 1A, 2, 2A,3,4,5 AND 17 AND THEN TRYING UR SCRIPT TO GET 20 AS MY ANSWER, BUT AFTER RELOADING THERE ARE 0 ROWS FETCHED.
Hi try this , I am getting 17, 20 as result
Table_1:
load * inline [
GROUP_ID
GROUP1
GROUP1A
GROUP2
GROUP2A
GROUP3
GROUP4
GROUP5
GROUP17 ];
Table_1a:
load
mid(GROUP_ID,6) as GROP_ID
resident Table_1;
drop table Table_1;
Table_2:
NoConcatenate
load * inline [
G_ID
1
1A
2
2A
3
4
5
20 ];
TAB:
NoConcatenate
load GROP_ID as GROUP_ID_new resident Table_1a;
inner join
load G_ID as GROUP_ID_new resident Table_2;
tab1:
NoConcatenate
load * Resident Table_1a where not exists(GROUP_ID_new,GROP_ID);
drop table Table_1a;
tab2:
NoConcatenate
load * Resident Table_2 where not exists(GROUP_ID_new,G_ID);
drop table Table_2;
drop table TAB;