Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Toronto, Canada
    Posts
    101
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Queries (2002-2003)

    Hey All!

    I have two tables, one called GST and the other called Without GST. The tables have all the same fields but of course different data. My question is this: I want to combine the two tables but have no duplicate records and all records that include GST. If no GST is available I would like to see nothing in that column.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Queries (2002-2003)

    You can create a union query:
    - Create a new query in design view.
    - Don't add any tables (cancel the Show Table dialog)
    - Select View SQL.
    - Type the following text in the SQL view of the query:

    SELECT * FROM GST
    UNION SELECT * FROM [Without GST]

    - Switch to datasheet view to see if the query returns what you want.

    Notes:
    - Union queries will suppress duplicate records by default.
    - A Union query can't be viewed in design view.
    - The records in a union query cannot be edited.

Posting Permissions

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