Using a Stored Procedure to Transfer Data from a Text File to SQL Server
The Microsoft SQL Server development team provides sample code for a stored procedure that transfers data from a text file to SQL Server.
April 23, 2002
Editor's Note: Send your SQL Server questions to Microsoft's SQL Server development team at [email protected].
What kind of stored procedure can I use to transfer data from a text file to SQL Server?
Listing 1 shows a stored procedure that transfers the data from a text file to SQL Server. You can also use Data Transformation Services (DTS), the T-SQL BULK INSERT statement, and the bulk copy program (bcp) utility to transfer the text data. For more information about these methods, see Curt A. Gilman, "The ABCs of Bcp," October 2001, InstantDoc ID 21926, and John Green, "Showdown—bcp vs. DTS," April 2001, InstantDoc ID 19760.
About the Author
You May Also Like