Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006

    Unanswered: Multiple field relations?


    Here is the problem:
    Got table empl:

    empl_nr        empl_name        empl_adress
    001                  JOe                     - 
    002                  Sara                    - 
    003                  Mark                    -
    and table ledg:

    account_nr     approver_nr     requester_nr 
    1234                 002                001 
    3455                 003                002 
    5678                 002                003
    Basicly it is for internal sales. Thus in Ledg, approver_nr and requester_nr correspond
    with empl_nr in the empl table.

    I want to display the account_nr, approver name and requester name in a query.
    Thus how I see it I have two references in empl for each one reference in Ledg.

    I figured I can create a temp table with fields : account_nr, approver_name and
    requester name. Then do a select into statement first to get approver name and then another statement to get requester name. And then display temp table.

    Can anyone help me out on this?

    Thanks in advance!

  2. #2
    Join Date
    Feb 2005
    Colorado Springs
    You shouldn't need to use a temporary table. You can access the employee table twice in your query, using empl AS approver and empl AS requester.

Posting Permissions

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