Welcome to SPN

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

Sign Up Now!

Combining 2 Tables

Discussion in 'Information Technology' started by carl, Nov 12, 2005.

  1. carl

    carl
    Expand Collapse
    Guest

    I have 2 tables in the same database. They are both set-up with the same
    columns. Is there a way to combine them into 1 table ?

    Thank you in advance.
     
  2. Loading...

    Similar Threads Forum Date
    India 11 Constables Get Pregnant at Training School Breaking News Apr 26, 2011
    Warm Up with Winter Vegetables (Vegetarian Casseroles) Cooking & Recipies Feb 7, 2011
    India Two constables arrested for beating, extortion Breaking News Jul 27, 2010
    History Cleaning Out the Augean Stables Punjab, Punjabi, Punjabiyat Aug 25, 2009
    Sikh News Cold weather damages sugarcane, vegetables in Punjab (New Kerala) Breaking News Feb 1, 2008

  3. Eric @ CMN, Evansville

    Eric @ CMN, Evansville
    Expand Collapse
    Guest

    Write an append query to take data from one table and append it to the
    other....then you can delete the table that is incomplete.

    "carl" wrote:

    > I have 2 tables in the same database. They are both set-up with the same
    > columns. Is there a way to combine them into 1 table ?
    >
    > Thank you in advance.
     
  4. carl

    carl
    Expand Collapse
    Guest

    thank you. and how is that done ?

    "Eric @ CMN, Evansville" wrote:

    > Write an append query to take data from one table and append it to the
    > other....then you can delete the table that is incomplete.
    >
    > "carl" wrote:
    >
    > > I have 2 tables in the same database. They are both set-up with the same
    > > columns. Is there a way to combine them into 1 table ?
    > >
    > > Thank you in advance.
     
  5. Eric @ CMN, Evansville

    Eric @ CMN, Evansville
    Expand Collapse
    Guest

    In SQL the append query should look something like this:

    INSERT INTO table2 ( field1, field2 )
    SELECT Table1.field1, Table1.field2
    FROM Table1;

    Where your table names and field names are inserted appropriately. Then you
    could copy and paste the SQL into a new query (after you switch to SQL view,
    of course). After that you could switch back to design view to see the SQL
    represented graphically.

    Hope this helps !


    "carl" wrote:

    > thank you. and how is that done ?
    >
    > "Eric @ CMN, Evansville" wrote:
    >
    > > Write an append query to take data from one table and append it to the
    > > other....then you can delete the table that is incomplete.
    > >
    > > "carl" wrote:
    > >
    > > > I have 2 tables in the same database. They are both set-up with the same
    > > > columns. Is there a way to combine them into 1 table ?
    > > >
    > > > Thank you in advance.
     
  6. Smartin

    Smartin
    Expand Collapse
    Guest

    carl wrote:
    > thank you. and how is that done ?
    >
    > "Eric @ CMN, Evansville" wrote:
    >
    >
    >>Write an append query to take data from one table and append it to the
    >>other....then you can delete the table that is incomplete.
    >>
    >>"carl" wrote:
    >>
    >>
    >>>I have 2 tables in the same database. They are both set-up with the same
    >>>columns. Is there a way to combine them into 1 table ?
    >>>
    >>>Thank you in advance.


    You could try

    INSERT INTO Table1 SELECT * FROM Table2

    You may have problems with keys, in which case you would need to modify
    the SELECT clause to exclude the key field.

    --
    Smartin
     

Share This Page