How can I find true date for my table on oracle sql

42 views Asked by At

I have two tables. TABLE A:

enter image description here

TABLE B:

enter image description here

I need to find which TARIFE_GECERLIK_ID on TABLE B should I use for TARIFE_ID for my TABLE A. For example; on TABLE B there are two different TARIFE_GECERLIK_ID for TARIFE_ID=10168822. First TARIFE_GECERLIK_ID begin 1.01.2012 and we can use this TARIFE_GECERLIK_ID until 10.07.2023 and then we should use 10336850. So for TABLE A; for TARIFE_ID=10168822, I want to put 10313919 TARIFE_GECERLIK_ID because between 17.05.2023 and 22.05.2023 TABLE B has this TARIFE_GECERLIK_ID

I want to see my new table like this:

enter image description here Can you help me?

0

There are 0 answers