Results 1 to 4 of 4
  1. #1
    narendrabr is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    21

    Query to return values

    Hi,



    I have two tables called Email and Code,

    I need query to return all emails that code field in code table with code field in email table.

    Attached the sample database.

    Also please provide the steps to where I should write queries as I am new to access.

    Thanks!Access example.accdb

  2. #2
    Abedecain is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    6
    First you need to make a relationship between the tables, a one to many from code (as the one) and email (As the many)

    Then just use the following SQL on a new query
    Code:
    SELECT Email.Email, Code.Code FROM Code INNER JOIN Email ON Code.Code = Email.Code;

  3. #3
    narendrabr is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    21
    Hi,

    OK.Why we need to make it as one to many?And how to make it?

    Where I should write the query and please give the steps.

    Thanks

    An

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Look here for a quick overview of queries.

    http://www.techonthenet.com/access/queries/index.php

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

Similar Threads

  1. Need aueries to return values
    By narendrabr in forum Queries
    Replies: 1
    Last Post: 01-08-2013, 07:34 AM
  2. Query return 0 for null values
    By rachello89 in forum Access
    Replies: 4
    Last Post: 02-23-2012, 08:38 AM
  3. Return values from five days ago
    By reidn in forum Queries
    Replies: 3
    Last Post: 08-02-2011, 11:37 AM
  4. No return on Null values
    By forrestapi in forum Queries
    Replies: 4
    Last Post: 10-18-2010, 08:09 AM
  5. Return all values from two queries
    By matteu1 in forum Queries
    Replies: 0
    Last Post: 08-18-2009, 01:02 PM

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