.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

how to import a data from Excel sheet to sql server table

Posted By: Deco     Posted Date: August 11, 2013    Points:5   Category :Sql Server
Please give me the sql query to read the excel sheet data and load it to sql server table. I do not want to go with SSIS Package. Please get me the transact sql

Responses
Author: Sagar Pardeshi             
Posted Date: August 14, 2013     Points: 20   
Author: Dhivakaran             
Posted Date: August 17, 2013     Points: 20   

Please use the below URL to read the data from excel

http://dotnetbites.com/read-data-from-excel-openrowset

-
Dhivakaran T
Author: Ashutosh Jha             
Posted Date: December 27, 2013     Points: 20   

You need to have bulk insert preveliage do that. Generally this access you will have if you are working in local.
Use the below code-

bulk
insert campaignplsqldata
from 'C:\sheetname.csv'
with
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
go



Happy Coding..!

Regards,
Ashutosh Jha
ashutosh741@gmail.com

http://www.tricksroad.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend