Hi I am running query on two files File1 and File 2 Having fields a,b,c and d,e,f respectively .A and D & B and E are of same type and are keys in the files. So i am running a query to find out all those records of File1 which are not present in File2. I am running the join on the basis to fields a,b and d,e.But some how its not working :
select * from file1 where a,b not in ((select a,b from file1 x,file2 y where y.a=x.d
and y.b=x.e) z)
It says not in clause not correct then i tried:
select * from file1 where not exists (select a,b from file1 x,file2 y where y.a=x.d
and y.b=x.e)
It is also not working !!! Please suggest !I am on DB2 AS400
You could also do this with a LEFT JOIN: