Uploading Data from ExcelRakesh MishraConsultant- SQL Server Database & BI
Speaker DetailsOver 9 years of experience in application development using Microsoft technologyFrom past 5 years working on data warehouse & database intensive applications MCTS (SQL Server 2008 Database Development and BI Development & Maintenance Currently working with GlobalLogic
Session Objectives And TakeawaysSession Objective(s): Various methods for data import from ExcelBuild a solution to import unstructured data from excel to SQL ServerKey Takeaways:Best practices and recommendations for data import from Excel to SQL Server
Various Methods of Data ImportImport/Export WizardMicrosoft SQL Server 2005 Integration Services (SSIS)SQL Server linked serversSQL Server distributed queriesOpenRowSet- XML to SQL.BCPActiveX Data Objects (ADO) and the Microsoft OLE DB Provider for SQL ServerADO and the Microsoft OLE DB Provider for Jet 4.0
Import/Export WizardDEMO
SSISDEMO
Linked Server
OpenDataSource/OpenRowSetBoth the OPENROWSET and OPENDATASOURCE functions provide ad hoc connection information. We can use these functions to specify all the information needed to access the OLE DB data source.If both can be used for ad hoc connection then what is difference between these two?
OpenDataSource/OpenRowSetDEMO
BCPThe bcp utility copies data between an instance of Microsoft® SQL Server™ and a data file in a user-specified format.
BCPDEMO
BULK INSERTImports a data file into a database table or view in a user-specified format.
BULK INSERTDEMO
DemoData import from unstructured Excel to SQL Server
Q & A
ContactRaku_mishra@hotmail.comhttp://rakumishra.spaces.live.com/
Thank you for suggestions, please email at community@peoplewareindia.com

Uploading Data From Microsoft Excel - Microsoft SLQ Server 2008 (by Rakesh Mishra)

Editor's Notes

  • #9 You can use the OPENROWSET function wherever the OLE DB provider returns rowsets either by specifying a table (or view) name or by specifying a query that returns a rowset. The OPENROWSET function can be used in the place of a table or view name in a Transact-SQL statement. --This example uses an ad hoc name to retrieve data from the Customerstable of a Microsoft Access version of the Northwind sample database. SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'c:MSOfficeAccessSamples orthwind.mdb';'admin';'password', Customers) Use OPENDATASOURCE only when the provider exposes rowsetsand uses the catalog.schema.object notation. This function can be used in the same Transact-SQL syntax locations a linked server name can be used. Thus, in the catalog.schema.object notation, OPENDATASOURCE can be used as the first part of a four-part name that refers to a table or a view name.-- SELECT from a table on another instance of SQL Server. SELECT * FROM OPENDATASOURCE( 'SQLOLEDB', 'Data Source=ServerName;User ID=MyUID;Password=MyPass' ).Northwind.dbo.Categories