locked
How can I move records from one table to another in Microsoft Access? RRS feed

  • Question

  • User524898530 posted

    How can I move records from one table to another in  Microsoft Access?. I would like to be using an sql. please give me an url or an example

    Friday, March 25, 2011 9:17 AM

Answers

  • User-1199946673 posted

    If you want to create a new table use:

     

    SELECT Field1, Field2, Field3 INTO NewTableName FROM OldTableName 
    

    If you want to add records to an existing table:

     

    INSERT INTO AnotherTable (Field1, Field2, Field3) SELECT Field1, Field2, Field3 FROM SomeTable
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 25, 2011 10:03 AM

All replies

  • User-1199946673 posted

    If you want to create a new table use:

     

    SELECT Field1, Field2, Field3 INTO NewTableName FROM OldTableName 
    

    If you want to add records to an existing table:

     

    INSERT INTO AnotherTable (Field1, Field2, Field3) SELECT Field1, Field2, Field3 FROM SomeTable
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 25, 2011 10:03 AM
  • User524898530 posted

    thanks

    Friday, March 25, 2011 11:26 AM
  • User-278201414 posted
    Create a stored procedure. to execute it in one time.

    INSERT INTO
    TableDestination (FieldName1, FieldName2, FieldName3)
    SELECT
    FieldName1, FieldName2, FieldName3 FROM TableSource (you may apply where condition here.)


    and to move that Record

    just delete it.

    Delete from
    TableSource (Apply where condition)

    thank you.

    Saturday, March 26, 2011 1:05 PM
  • User-1199946673 posted

    Create a stored procedure. to execute it in one time.

    He's using Access!!!!

    Saturday, March 26, 2011 1:55 PM