Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2001
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    comparing date values in a query (Access2000)

    I am trying to compare two date fields in a query. I want a=b (where field 'a' from table 1 is equal to field 'b' from table 2) then return the datevalue that is true for the query. These two fields are joined by corresponding system numbers.
    How should I proceed? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Star Lounger
    Join Date
    Sep 2001
    Location
    SC, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: comparing date values in a query (Access2000)

    If the two tables are linked by the system number, there is no need to display the number twice or the date twice. Open your query in "Sql view" and use this sql (rename the fields and tables to match yours):
    SELECT Table1.SysNum, Table1.dateA
    FROM Table1 INNER JOIN Table2 ON Table1.SysNum = Table2.SysNum
    WHERE (((Table1.dateA)=[Table2].[dateB]));
    <img src=/S/chatter.gif border=0 alt=chatter width=38 height=16>

  3. #3
    New Lounger
    Join Date
    Sep 2001
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: comparing date values in a query (Access2000)

    Thanks, I think we have a winner here!!
    Seems like I am getting the data that I am looking for.
    I really appreciate the help!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •