Results 1 to 2 of 2
  1. #1
    face is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Location
    South Carolina
    Posts
    7

    MaxDate1 > MaxDate2

    I have a query that I am trying to have it return the result of rows where a Max date is greater than another Max date.

    Here is what I currently have.



    HAVING
    ((([Terms Research].Resolved)=0) AND ((Max(Transfers.[Effective Date]))
    Is Null)) AND
    ([MaxNewHireEffectiveDate] > [MaxTermEffectiveDate]);

    If I have just the first line it is fine, when I add the 2nd line it prompts
    for both dates. Without 2nd line both date fields are populated.

    Thanks

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    You would probably need a query of a query. In your first query look for the ID, Max(date1) AS MaxOfDate1, Max(date2) AS MaxOfDate2. Call it qryWhatever. In your second query, do
    SELECT ID FROM qryWhatever WHERE where MaxOfDate1 > MaxOfDate2

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums