locked
how do i import data into an existing table RRS feed

  • Question

  • how do i import data into an existing table?
    Thursday, March 5, 2015 5:54 PM

Answers

  • Refer the below link

    If its a flat file

    http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/

    http://c--shark.blogspot.com/2011/08/how-to-use-sql-server-2008-r2-import.html

    If the source is a DB Server  then change the source details.

    --Prashanth


    Thursday, March 5, 2015 6:00 PM
  • Hi Mohammed,

    According to your description, you want to import data to an existing table. To achieve this requirement, we can use SSIS package or Import and Export wizard.

    To use a SSIS package, please refer to the following steps:

    1. Drag a Data Flow Task to Control Flow Task.
    2. Create a OLE DB Connection Manager that connects to the corresponding server database.
    3. Drag an OLE DB Destination with the target OLE DB Connection Manager that connects to the Source component, then select the existing table from the drop-down list as the destination table.
    4. Click Mapping pane to finish the mapping.

    For the example about how to use Import and Export wizard, please refer to the links post by Prashanth.

    Thanks,
    Katherine Xiong


    Katherine Xiong
    TechNet Community Support

    Friday, March 6, 2015 11:31 AM

All replies

  • Refer the below link

    If its a flat file

    http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/

    http://c--shark.blogspot.com/2011/08/how-to-use-sql-server-2008-r2-import.html

    If the source is a DB Server  then change the source details.

    --Prashanth


    Thursday, March 5, 2015 6:00 PM
  • From where? I mean whats the source?

    If its SQLServer you dont even need SSIS. You can simply use INSERT..SELECT statement so far as dbs are in same server.

    In SSIS you can use a data flow task for this purpose Use OLEDB Source and OLEDB destination for that. In case you need to do any transformation in between add corresponding tasks like derived column,lookup etc

    In case of txt,csv files use flat file source and for excel use excel source


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Thursday, March 5, 2015 6:02 PM
  • Hi Mohammed,

    According to your description, you want to import data to an existing table. To achieve this requirement, we can use SSIS package or Import and Export wizard.

    To use a SSIS package, please refer to the following steps:

    1. Drag a Data Flow Task to Control Flow Task.
    2. Create a OLE DB Connection Manager that connects to the corresponding server database.
    3. Drag an OLE DB Destination with the target OLE DB Connection Manager that connects to the Source component, then select the existing table from the drop-down list as the destination table.
    4. Click Mapping pane to finish the mapping.

    For the example about how to use Import and Export wizard, please refer to the links post by Prashanth.

    Thanks,
    Katherine Xiong


    Katherine Xiong
    TechNet Community Support

    Friday, March 6, 2015 11:31 AM
  • You've got some good ideas already.  Here's one more to consider.

    http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/


    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Friday, March 6, 2015 6:20 PM
  • Use the Slowly Changing Dimension task in the SSIS.

    Friday, March 6, 2015 8:23 PM