Results 1 to 2 of 2
  1. #1
    lamkee is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2010
    Posts
    9

    Lightbulb how to return the result?

    HI everyone,



    I have 2 tables and the structure is the same of each tables.
    However,table B's data must less than table A.

    Table A
    AAA 100
    BBB 100
    CCC 100

    Table B
    AAA 100
    CCC 100

    I would like to return result

    AAA 100 Yes
    BBB 100 NO
    CCC 100 YES

    Please advise how to do it.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Off the top of my head:

    SELECT TableA.FirstField, TableA.SecondField, IIf(IsNull(TableB.FirstField), "No", "Yes") As ThirdField
    FROM TableA LEFT JOIN TableB ON TableA.FirstField = TableB.FirstField
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 05-18-2010, 01:43 PM
  2. Passing SQL result into variable
    By jonny in forum Access
    Replies: 3
    Last Post: 10-18-2009, 07:46 AM
  3. How do I determine a SQL query result?
    By Trainman in forum Database Design
    Replies: 1
    Last Post: 10-15-2009, 04:49 AM
  4. Multiple inputs one result
    By ee12csvt in forum Queries
    Replies: 0
    Last Post: 09-11-2009, 03:19 AM
  5. My report yields more than one result
    By hawzmolly in forum Reports
    Replies: 16
    Last Post: 07-04-2009, 10:30 AM

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