copying records from one table to another table

  • hi friends,

    i have a table with more tha 20 lakhs of records.now i want to copy some of those records in to a new table based on condition.

    if any body knows please let me.

    thanks in advance,

    cheers,

    ram.

  • select * into NewTableName from OldTableName where "put your condition here"

    Refer BOL and msdn for more help.



    Pradeep Singh

  • Hi Ram .

    this task can be accomplished by SSIS . if u worked with SSIS easily u can copy the values from source to Destination based on your condition .

    open SSIS --> Dataflow Task -->

    use OLEDB Source --> Look Up Transformation (in this u specify the condition to which data to be transfer) --> OLEDB Destination

    it will work fine ..

    if u have any doubt .. reply me ..

    Regards,

    Sabari.C

  • hi sabarichandru ,

    first of all i am very thank ful for your quick reply.i don't know what is that SSIS and how to open that.i am using sql server2005 and the data is in server.

    cheers,

    ram.

  • Hi ram ,

    are you using Sql server management studio(SSMS) or Sql Business intelligence development studio .

    SSIS comes under Sql Business intelligence development studio .

    but you can copy by using SSMS through import and Export data wizard .

    in SSMS --> Object Explore ..> right click database name ..>Click task ..> import data

    follow these steps u can easily copy the data with minimal effort .

    Reply

    Regards,

    Sabari.C

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

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