djroge1 Posted April 25, 2011 Posted April 25, 2011 This is for a school project and I'm stuck at this point so I could use some help. First, because it is a school lab I cannot load any outside files directly and that's what is making this difficult. I have an Excel file with around 1400 entries and I need to INSERT them into a SQL table. I don't want to manually type out all of that data to go into the table. Are there any other options to accomplish this? I also have to add a "balance" column. Here is my table and following below it is an example of the data that needs to go into the file (not including the pipes) create table Accounts ( account int PRIMARY KEY NOT NULL, description varchar(40), short description varchar(250) balance decimal(10,2), ); ACCOUNT| DESCRIPTION | SHORT DESCRIPTION| 200043| Martin's Dairy| Encinitas Cheese & Dairy Vendor|
Guest FarnsBarns Posted April 25, 2011 Posted April 25, 2011 http://support.microsoft.com/kb/321686 Not tried it but sounds about right.
rct Posted April 25, 2011 Posted April 25, 2011 I've heard good things about the Gibson IT Department, so you came to the right place! rct
djroge1 Posted April 25, 2011 Author Posted April 25, 2011 I've heard good things about the Gibson IT Department, so you came to the right place! rct ROTFL \:D/
djroge1 Posted April 25, 2011 Author Posted April 25, 2011 http://support.microsoft.com/kb/321686 Not tried it but sounds about right. I'll take a look - thanks.
djroge1 Posted April 25, 2011 Author Posted April 25, 2011 So in my search to answer my own question I came across this totally excellent tool called QueryCell incase any of you ever need to transfer data. Querycell.com
dbreslauer Posted April 26, 2011 Posted April 26, 2011 I'll take a look - thanks. DTS is a good suggestion. You could also (probably) connect to your sql server DSN from within excel, and whip up an insert from inside excel too. haven't done this in years, but i imagine it hasn't changed much.
CajunBlues Posted April 26, 2011 Posted April 26, 2011 I always use the concatenate xl function to automatically build the code and then paste the code from that column into sql server.. it is very fast way to do it.. I can send you this xl file if you like... email ? click on this image to enlarge..
djroge1 Posted April 26, 2011 Author Posted April 26, 2011 I was able to download a trial version of querycell to make the transfer. Thanks for the offer. Using the concatenate function would one have to cut and paste that into each row?
CajunBlues Posted April 26, 2011 Posted April 26, 2011 I was able to download a trial version of querycell to make the transfer. Thanks for the offer. Using the concatenate function would one have to cut and paste that into each row? Yes you copy and paste all the way down the column.. that is the beauty of it...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.