I have three different databases from three different departments and I need to pull Date of Death information from each of them.
If Database A has a Date of Death, great. I can just map in the Date of Death from Database A.
But, if Database A is Null, Database B is Null, and Database C has a Date of Death, I need to map in the Date of Death from Database C.
If Database A is Null, Database C is Null, and Database B has a Date of Death, I need to map in the Date of Death from Database B.
If Database A, B, and C are all Null, I need the final result to show a Null value.
I've tried to write a starting expression below, but it doesn't work (which I expected). Can anyone help with this expression so that it gives me the results described above?
IIf([dodA] Is Not Null, [dodA], IIf([dodA] Is Null AND [dodB] Is Null AND [dodC] Is Not Null, [dodC], IIf([dodA] Is Null AND [dodC] Is Null AND [dodB] Is Not Null, [dodB], Null)))
If Database A has a Date of Death, great. I can just map in the Date of Death from Database A.
But, if Database A is Null, Database B is Null, and Database C has a Date of Death, I need to map in the Date of Death from Database C.
If Database A is Null, Database C is Null, and Database B has a Date of Death, I need to map in the Date of Death from Database B.
If Database A, B, and C are all Null, I need the final result to show a Null value.
I've tried to write a starting expression below, but it doesn't work (which I expected). Can anyone help with this expression so that it gives me the results described above?
IIf([dodA] Is Not Null, [dodA], IIf([dodA] Is Null AND [dodB] Is Null AND [dodC] Is Not Null, [dodC], IIf([dodA] Is Null AND [dodC] Is Null AND [dodB] Is Not Null, [dodB], Null)))