how to insert values from other table

  • I need to populate the table values from another table on daily basis.both the tables similar in some columns.

    table1 table2

    servername Recordno

    status servername

    status

    date

    how to populate table1 values into table2 on daily.

    Any suggestions highly appreciable.

    Thanks,

  • What is the status column reflects?

    Do you want to eliminate duplicate records?

  • status column is just "y/n" column.

  • insert into table2

    (servername,

    status,

    date)

    select

    servername,

    status,

    getdate()

    from table1

    put this into a stored procedure and create an SQL job for the stored procedure thereafter schedule your job to run at the time you want to populate your table

  • Thanks for your help.It exactly correct.I got the vlaues.

  • ramu4ind (9/26/2008)


    I need to populate the table values from another table on daily basis.both the tables similar in some columns.

    table1 table2

    servername Recordno

    status servername

    status

    date

    how to populate table1 values into table2 on daily.

    Any suggestions highly appreciable.

    Thanks,

Viewing 6 posts - 1 through 5 (of 5 total)

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