+ Reply to Thread
Results 1 to 2 of 2

Thread: Missing Fields

  1. #1
    Valued Forum Contributor
    Join Date
    06-16-2008
    Posts
    252

    Missing Fields

    I am a newbie to access and i'm going through various tutorials to pick up how access works.

    The following are my two tables:

    DB
    Product
    Item
    Name
    Source

    DATA
    Name
    Volume
    Time
    Total

    Within my DB I have A, B and C within the Name Fields but within my DATA table I have A, B, C and D. I have managed to write the following query to link the two tables:

    SELECT DB.Product, DB.[Item], DB.[Name], Data.Volume, Data.Time, Data.Total
    FROM DB LEFT JOIN Data ON DB.[Name]=Data.[Name];

    but how do i get to add the missing name D into my DB table?

    Please could somebody help. Thanks in advance.

  2. #2
    Forum Moderator ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2003 & 2010
    Posts
    1,797

    Re: Missing Fields

    Hi aftabn10,

    You need to reverse the join and add Data.Name to the statement, like this:

    Code:
    SELECT DB.Product, DB.Item, DB.Name, Data.Volume, Data.Time, Data.Total, Data.Name
    FROM DB RIGHT JOIN Data ON DB.Name = Data.Name;
    Cheers,
    Docendo discimus.

    Please consider:
    • Thanking those who helped you. Click the reputation icon in the contributor's post and add Reputation.
    • Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0