This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Showing posts with label How to import data from Excel to SQL Server. Show all posts
Showing posts with label How to import data from Excel to SQL Server. Show all posts

Thursday, November 1, 2012

How to import data from Excel to SQL Server


How to import data from Excel to SQL Server


Introduction


In this article you will see how to use the SQL Server import an MS Excel file on your computer to a database on your SQL Server.


Open The Sql Query window select the database and Type

create database samp

go
sp_configure 'show advanced options',1 
reconfigure with override 
go 
sp_configure 'Ad Hoc Distributed Queries',1 
reconfigure with override 
go
SELECT * into temptable
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
                'Excel 8.0;DATABASE=C:\Users\RAJU\Desktop\pincodes.xls;IMEX=1',
                'SELECT * FROM [Sheet1$]')

select * from temptable