oracle - Sql compare mismatch values -
I would like to compare values between 2 separate tables and only return the difference but IM will come with a query Is struggling for.
I have an employee tab 1 and employee tab 2. I am comparing data between God and testing.
Employee 1
order1 1 Reg Reg2 regular 2 temporary floating 3 Reg Regular 4 new new rent 5 del end
< P> employee2 id2 cd2 desc2 1 regulate regular 2 temporary temporary -456 3 regular reg-123 4 new new rent 5 del end
My result should be set (i < i tried this approach but give it duplicate results Thank you for your help! <
Id cd1 desc1 cd2 desc2 1 reg regular reg regular-123 2 temp temporary temporary temporary -456
select EMPL_ID, S D1, 1, CD2, 2 to Ampl 1, Employ 2 WHERE EMPL_ID1 = EMPL_ID2 and CD1 = CD2 and desc1 & lt;> desc2
Depending on your data, you may see id < / Code>,
cd1
:
do not select empl1.EMPL_ID, cd1, desc1, cd2, desc2, empl1 empl2 at empl1.EMPL_ID = empl2.EMPL_ID and empl1 CD1 = Empl2.cd2 and empl1.desc1 & lt; & Gt; Empl2.desc2;
Comments
Post a Comment