Copying records in SQL

Results 1 to 2 of 2

Thread: Copying records in SQL

  1. #1
    Joshua Mann Guest

    Default Copying records in SQL

    I need to write a SQL statement that will copy certain information from one record in a table to a new record in another table. How do i do this? Thank You.

  2. #2
    Neil Popham Guest

    Default RE: Copying records in SQL

    use the following SQL format:<BR><BR>INSERT INTO Table2 ( Table2Field1, Table2Field2 )<BR>SELECT Table1.Table1Field1, Table1.Table1Field2<BR>FROM Table1<BR>WHERE Table1.Table1Field1="myvalue";<BR><BR>this will take two fields, &#039Table1Field1&#039 and &#039Table1Field2&#039, and insert them into &#039Table2&#039 as fields &#039Table2Field1&#039 and &#039Table2Field2&#039<BR><BR>the record(s) in &#039Table1&#039 will be selected where Table1Field1 = "myvalue" - this may, more normally, be an Autonumber link to provide a unique record, therefore the line will be, for example:<BR><BR>WHERE Table1.ID=64;

Posting Permissions

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