Data Import & Export

This is a list of all the articles posted on this blog about SQL Server’s data import & export functionality.

Generate multiple CSV data files from SQL

Assume that there are thousands of rows in a table and the rows need to be split and saved in different CSV files based on date or category or status. Have you ever come across such a requirement? If so, here is the code to accomplish it. USE TestDB1GO DECLARE @TestData20 TABLE(IntValCol INT, DateCol DATETIME) INSERT INTO @TestData20 (IntValCol, DateCol) VALUES(1,’09/05/2020′), (2,’09/05/2020′),…

Import from Excel – Named Sheet

This article is to let you know how to import Excel data into SQL Server. First of all download a set of components i.e OLE DB support that can be used to facilitate the transfer of data between Microsoft Office System files and non-Microsoft Office applications. Please click here for the Microsoft download link. The excel file has only one sheet and…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s