"connecting blank fields"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jj

    "connecting blank fields"

    Hi NG
    I got 2 tables

    In both of the tables there are 4 indentical fields
    1) Road name
    2) House number
    3) Letter
    4) Floor

    In table one there is an extra field - an Id field. In this table each
    record is unique (the combination of the 4 fields above)

    In table number two, a record with the four fields can be represented
    multiple times.

    Now I want to make a query, where each record from table two is represented,
    combined with the ID from table one

    My problem is that I only know how to combine the two tables, where all four
    fields are filled out, and that is almost never the case. There might be on
    or two blank fields in each records

    Thanks in advance

    JJ


  • Allen Browne

    #2
    Re: "connectin g blank fields"

    See help on UNION query.

    1. Create two queries - one into each table - that select the same 4 fields
    in the same order. Use whatever criteria you need to restrict the records.

    2. Switch the queries to SQL View (View menu).

    3. In one query, replace the trailing semicolon with the word:
    UNION
    and paste in the SQL statement from the other query.

    Access cannot show you a UNION query graphically.

    For the longer term, consider whether you should integrate these two tables
    into one. Just add an extra field to indicate which record belongs to which
    idea.
    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html

    "jj" <jj@get2net.d k> wrote in message
    news:3f543846$0 $20077$edfadb0f @dread11.news.t ele.dk...[color=blue]
    > Hi NG
    > I got 2 tables
    >
    > In both of the tables there are 4 indentical fields
    > 1) Road name
    > 2) House number
    > 3) Letter
    > 4) Floor
    >
    > In table one there is an extra field - an Id field. In this table each
    > record is unique (the combination of the 4 fields above)
    >
    > In table number two, a record with the four fields can be represented
    > multiple times.
    >
    > Now I want to make a query, where each record from table two is[/color]
    represented,[color=blue]
    > combined with the ID from table one
    >
    > My problem is that I only know how to combine the two tables, where all[/color]
    four[color=blue]
    > fields are filled out, and that is almost never the case. There might be[/color]
    on[color=blue]
    > or two blank fields in each records
    >
    > Thanks in advance
    >
    > JJ
    >
    >[/color]


    Comment

    Working...