I am having a hard time understanding exactly what you are trying to do, and it is tough to determine what your tables, columns or relationships are from the short email. Also what database are you using? <br><br>It kinda sounds like you need to use a null test function. In MySQL that would be ifnull(), in T-SQL that would be isnull(), and PL/SQL would be nvl().<br>
<br>If you left or right join the tables and to force the one that you&#39;re not sure of to supply a null if it&#39;s not supplied, then you can use the above function to grab either the right date.<br><br>I&#39;m more familiar with MS and Oracle DBs, and with those you can use ranking functions and the over() clause to handle certain instances of trying to determine most recent with dates. I would bet MySQL has something similar too, thought it may be overkill for what you need.<br>