Mark Simms
marksimms at verizon.net
Mon Feb 13 13:23:15 CST 2012
Oh, if only to have Access retain the formatting in SQL view ! I mean what...that's probably 10 lines of code somewhere ? Pretty Print is my savior for this big gaffah. > Chester, try this: > > SELECT > A.WellNumber, > A.[Test Date], > Min(B.Switch_Date) AS MinOfSwitch_Date > FROM [tbl Injection Profiles to Run] AS A > LEFT JOIN Switches AS B > ON B.Well = A.WellNumber > GROUP BY > A.WellNumber, > A.[Test Date] > HAVING > (Min(B.Switch_Date)>(A.[Test Date]+365))