Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Union queries

Discussion in 'Information Technology' started by KBV, Jul 28, 2006.

Tags:
  1. KBV

    KBV
    Expand Collapse
    Guest

    Are union queries useful? Can it be done using other kinds of queries in two
    steps?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikh Union Make Special Visit To Houses Of Parliament To Showcase Their Community Work - Breaking News Jul 30, 2016
    Heritage India's Union Sports Ministry To Promote Gatka History of Sikhism Oct 23, 2013
    Hi-Tech Unites the World's Sikhs in Daily Communion Sikh Sikhi Sikhism Jun 29, 2013
    The Holy Union of Anand Karaj New to Sikhism Mar 16, 2013
    General Union with God (BoKSD 6) Hard Talk Dec 4, 2012

  3. Ken Snell \(MVP\)

    Ken Snell \(MVP\)
    Expand Collapse
    Guest

    Union queries are very useful. No, you cannot replicate their results using
    two "steps" unless you build a table with one of those steps and then fill
    that table with the results of individual queries.

    --

    Ken Snell
    <MS ACCESS MVP>

    "KBV" <KBV@discussions.microsoft.com> wrote in message
    news:DD03CD5F-0E1A-4310-B363-2AFCF458A80A@microsoft.com...
    > Are union queries useful? Can it be done using other kinds of queries in
    > two
    > steps?
    >
    >
     
  4. KBV

    KBV
    Expand Collapse
    Guest

    Can I create union queries in design view using type of query or must it be
    written in sql?

    ALso, can you give me an ex. of where a union query would be needed and why
    it could not be acheived with 2 queries instead?

    Thanks


    "Ken Snell (MVP)" wrote:

    > Union queries are very useful. No, you cannot replicate their results using
    > two "steps" unless you build a table with one of those steps and then fill
    > that table with the results of individual queries.
    >
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    > "KBV" <KBV@discussions.microsoft.com> wrote in message
    > news:DD03CD5F-0E1A-4310-B363-2AFCF458A80A@microsoft.com...
    > > Are union queries useful? Can it be done using other kinds of queries in
    > > two
    > > steps?
    > >
    > >

    >
    >
    >
     
  5. Ken Snell \(MVP\)

    Ken Snell \(MVP\)
    Expand Collapse
    Guest

    Union queries cannot be created in the "grid" design view for a query. They
    must be created in SQL view.

    The whole purpose of union queries is to combine the records from two or
    more queries, such that you get a single query as the result. I'm not sure
    how to explain it better than that. For example, suppose you have two
    queries that return two fields from a single table each:

    SELECT Field1, Field2
    FROM Table1;

    and

    SELECT Field1, Field2
    FROM Table2;

    You can run these queries independently and get the records from the query,
    but only one a time. In a union query, you can combine the two queries'
    output into a single query:

    SELECT Field1, Field2
    FROM Table1
    UNION
    SELECT Field1, Field2
    FROM Table2;
    --

    Ken Snell
    <MS ACCESS MVP>






    "KBV" <KBV@discussions.microsoft.com> wrote in message
    news:7AE15AFC-FF79-44CA-9F1B-E4E42A4D568F@microsoft.com...
    > Can I create union queries in design view using type of query or must it
    > be
    > written in sql?
    >
    > ALso, can you give me an ex. of where a union query would be needed and
    > why
    > it could not be acheived with 2 queries instead?
    >
    > Thanks
    >
    >
    > "Ken Snell (MVP)" wrote:
    >
    >> Union queries are very useful. No, you cannot replicate their results
    >> using
    >> two "steps" unless you build a table with one of those steps and then
    >> fill
    >> that table with the results of individual queries.
    >>
    >> --
    >>
    >> Ken Snell
    >> <MS ACCESS MVP>
    >>
    >> "KBV" <KBV@discussions.microsoft.com> wrote in message
    >> news:DD03CD5F-0E1A-4310-B363-2AFCF458A80A@microsoft.com...
    >> > Are union queries useful? Can it be done using other kinds of queries
    >> > in
    >> > two
    >> > steps?
    >> >
    >> >

    >>
    >>
    >>
     

Share This Page