I'm trying to compare 2 columns and the goal is the return of the lines that don't match. For example I have in column 1 and 2 the following
1 2
id name age job id name age job
1 aaa 11 bbb 1 aaa 11 bbb
2 ccc 22 ddd 2 ccc 22 eee
the return I'm looking for is
2 ccc 22 ddd
2 ccc 22 eee
I'm trying to use the following
select id, name, age from 1 where id in
(
select id, name, age from 1
minus
select id, name, age from 2
)
union all
select id, name, age from 2 where id in
(
select id, name, age from 1
minus
select id, name, age from 2
)
order by id
I get the following error
ORA-00913: demasiados valores
00913. 00000 - "too many values"
*Cause:
*Action:
Error at Line: 6 Column: 1
That refers to the line with the 1st (
Any help would be very appreciated.
The specific error you are getting is because of the following:
You can not use an in clause to compare a single value of ID to 3 other values.