Import data from Excel to SQL Server 2005 table


Author
Message
Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Hi

I'm looking for a sample to importa data from a MS Excel file to SQL Server 2005 table, I'm working with an Inventory table (product, sku, price, cost...) the idea is importa the data directly to SQL Server table that of course is user in a SF application.

I already search in Google and MSDN forums but i can fin anything like this, just to open Excel files, and I need to load the data in a table. Hope someone have a small sample?

Kindest regards

Smile Everything is possible, just keep trying...

Reply
Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Ken

Thanks for the sample, gives me some ideas, I notice that this routine creates a new table, I already have the table (wich includes key fiels, relationships) in which I want to import (should I say append the data) the data from Excel.

I think I have to learn something about "SQL Bulk Insert"

Thanks to all, maybe if something can be done could be a good adition to samples section. I think that many people uses Excel every day and when us as programmers create routines to import the information from Excel to our database and tables so they dont have to add every new record for start working it's a good help. Of course depends the type of application.

Regards.

Smile Everything is possible, just keep trying...

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search