Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    108
    Provided Answers: 1

    Unanswered: Stored Procedure Append All From Table A To Table B

    Hi All,

    I've never used a stored procedure before - let alone created one.
    Ive Googled a bit, but have not been able to find an exable of how to append records from table A to table B.

    Do you know of a sample I can use to give me some guidance?

    thanks
    w

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Quote Originally Posted by goss View Post
    Hi All,

    I've never used a stored procedure before - let alone created one.
    Ive Googled a bit, but have not been able to find an exable of how to append records from table A to table B.

    Do you know of a sample I can use to give me some guidance?

    thanks
    w
    There are many ways to accomplish this task. A simple approach is to select data from one table and insert into another table.
    CREATE PROCEDURE <-- syntax
    as
    BEGIN
    INSERT INTO TABLE_A (col1,col2....)
    SELECT cola,colb,....
    FROM TABLE_B
    WHERE (if applicable)

    ERROR HANDLING <--
    END

Posting Permissions

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