0

There are two table which am joining, but unable to find duplicates properly:

Below are 2 input tables:

Input table 1

Input table 2

Output required

3
  • Does this answer your question? How do I find duplicate values in a table in Oracle? Commented Jul 17, 2020 at 10:29
  • Please explain what YOU mean by "duplicate". Commented Jul 17, 2020 at 10:40
  • Can you explain the logic behind this input? What duplicates are you referring to? Commented Jul 17, 2020 at 10:40

1 Answer 1

1

It looks like you want to eliminate duplicates, which you can do using select distinct:

select distinct t1.id_number, t1.id, t2.id_type, t2.id_value from table1 t1 join table2 t2 on t2.id = t1.id; 
Sign up to request clarification or add additional context in comments.

2 Comments

Suppose all the vendors are giving (ID_number =A, ID_value=apple) while there is one outlier vendor which gives (ID_number =B, ID_value=apple). Am searching for such cases where one ID_value is mapped to multiple ID_number. Since both the tables are combined with ID as common key. I tried below but can't get further select distinct id_number, id_value from table a, table b where a.id=b.id and id_value is not null group by id_number,id_value
@Nemesi7000 . . . Your comment doesn't seem very related to the question that was asked. I would suggest that you ask a new question with appropriate sample data, desired results, and explanation of what you want to do.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.