In a nutshell here is what I want to happen:
Complete the join, if the rows do not exist do the same join but using one different value to fill the null columns in each row.
Here is my join:
Left Join CMS_ECH.dbo.hsplit hsplit on hsplit.row_date = ANDREWSTABLE.SegStart_Date
and hsplit.split=ANDREWSTABLE.dispsplit
and hsplit.starttime = ANDREWSTABLE.Interval
and hsplit.acd = ANDREWSTABLE.acd1
Where ACD1 is either 1 or 4.
For some rows there will be nulls.
If the result of the join returns a null row_date then... and here is where my knowledge fails me... so for the sake of no other words to describe it... rejoin the null rows in the table using a different value for acd1. If acd1 = 1 then use 4. If acd1 is 4 then use 1.
I am using MS SQL 2005