cancel
Showing results for 
Search instead for 
Did you mean: 

To get address numbers based on building code

Former Member
0 Kudos

Hi All,

Here is my requirement.

I need to select all address numbers from ADRC table based on building code.

For instance, say I want all address numbers where building code = ABC.

I can write a simple inner join query between ADRC & ADCP.

But the problem is, the ADRC table can have multiple address numbers. Say, for a specific Partner number & Person number, the ADRC table has following 3 entries. Lets say 3rd one is valid.

Addr 1 = XYZ'.

Addr2 = 'ABC'.

Addr3 = 'MNO'.

Now if I use that select query, it will fetch the second one, though it is the older one which is not valid anymore.

Is there any fields in ADRC with which we can decide which is the recent valid address number?

Kindly provide your valuable help for this scenario.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Have found out the way to get this.

Former Member
0 Kudos

Is there any fields in ADRC with which we can decide which is the recent valid address number?

Would DATE_FROM and DATE_TO fields help you with validity of the address?

Former Member
0 Kudos

Nopes.

For all the multiple entries, DATE_TO and DATE_FROM are the same.

Former Member
0 Kudos

How do you define "valid"?