Insert more than 1 records using stored procedure

  • I wish to insert more than 1 records using stored procedure, may I know how to do that?

    Example:

    Table A:

    ID TransDT Actions

    -- ----------- ----------

    1 01-Dec-2008 02:00:00 Login

    2 01-Dec-2008 03:12:10 Logout

    3 01-Dec-2008 12:30:12 Login

    4 01-Dec-2008 14:12:56 Login

    I wish to select records where TransDT between 01-Dec-2008 07:00:00 and 01-Dec-2008 18:00:00 and insert into Table B.

    Thanks

  • Insert into TableB(columns)

    Select columns from TableA

    Where TransDT between '01-Dec-2008 07:00:00' and '01-Dec-2008 18:00:00'


    Madhivanan

    Failing to plan is Planning to fail

  • Yes Madhivanan is correct .. it will work fine.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply