SQL Server Data Import Methods

SQL Server supports a variety of tools to help you import data:

*   Bulk copy program (see SQL Server Bulk Copy Program (BCP) )

*   You can query another database using OLE and the OPENROWSET command  (see Querying Other Databases From SQL Server)

*   In a query window, you can use the OPENROWSET command to import from a text file.  For example:

INSERT INTO T(XmlCol)
SELECT * FROM OPENROWSET(
   BULK 'c:\SampleFolder\SampleData3.txt',
   SINGLE_BLOB) AS x
*   In a query window, use the "bulk insert" command to import a text file:

BULK INSERT AdventureWorks.Sales.SalesOrderDetail
   FROM '\\computer2\salesforce\dailyorders\neworders.txt';
GO