I have a table that I want to loop through each record and apply a case statement for each column to tell if the date in the table is earlier than a matching record in a second table.
Secondary table to see if the matching record is after the date in the first table. Looking at the dates in the PA_Date column
[Material Number] GA_Date PA_Date ES_Date
110936-B21 1/2/2006 2/1/2006 5/6/2007
110445-B21 12/1/2004 1/1/2005