Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
If i have two table
Table 1
A, B
1,5
2,8
3,9
Table 2
A,C
1,10
7, 14
0,0
I want retrieve juste the lines which exists in Table 1 but not exist in Table 2, How I have to proceed ?
in the above example, i have to retrieve (
2,8
3,9
)
Thanks in advance for your help
Hi,
Use exist()
Regards,
Hi,
Try like
Table2
load * from table2;
noconcatenate
FinalTable1:
load * from table1
where not exist(A,A)
Regards
Thanks for your answer.
I thinks exist works just for one field. for me i have 6 fields in common like this :
Table 1
A,B, C,D, E, F, Y
1, 2, 3,4, 5, 6, 0
2, 4,6 ,8, 10,12, 1
3, 6, 9,12,15,18, 2
Table 2
A,B, C,D, E, F, Z
1, 2, 3,4, 5, 6, 0
the resullts must be :
2, 4,6 ,8, 10,12, 1
3, 6, 9,12,15,18, 2
Best regards
Hi,
Using WHERE NOT EXISTS should give you your result
LOAD * Inline [
A, B
1,5
2,8
3,9
];
Table2:
LOAD * Inline [
A,C
1,10
7, 14
0,0
]
Where NOT Exists(A,A);
Hi,
Try using OR /And
in where clause.
like not exists(A,A) or Exists(B,B)
Regards
Table2:
Load *,A&B&C&D& E& F As Key Inline [
A,B, C,D, E, F, Z
1, 2, 3,4, 5, 6, 0 ];
Table1:
Load * Where Not Exists(Key);
Load *,A&B&C&D& E& F As Key Inline [
A,B, C,D, E, F, Y
1, 2, 3,4, 5, 6, 0
2, 4,6 ,8, 10,12, 1
3,6, 9,12,15,18, 2
] ;
Drop Table Table2;