djroge1 Posted April 25, 2011 Share 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| Link to comment Share on other sites More sharing options...
Guest FarnsBarns Posted April 25, 2011 Share Posted April 25, 2011 http://support.microsoft.com/kb/321686 Not tried it but sounds about right. Link to comment Share on other sites More sharing options...
rct Posted April 25, 2011 Share Posted April 25, 2011 I've heard good things about the Gibson IT Department, so you came to the right place! rct Link to comment Share on other sites More sharing options...
djroge1 Posted April 25, 2011 Author Share Posted April 25, 2011 I've heard good things about the Gibson IT Department, so you came to the right place! rct ROTFL \:D/ Link to comment Share on other sites More sharing options...
djroge1 Posted April 25, 2011 Author Share Posted April 25, 2011 http://support.microsoft.com/kb/321686 Not tried it but sounds about right. I'll take a look - thanks. Link to comment Share on other sites More sharing options...
djroge1 Posted April 25, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
dbreslauer Posted April 26, 2011 Share 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. Link to comment Share on other sites More sharing options...
CajunBlues Posted April 26, 2011 Share 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.. Link to comment Share on other sites More sharing options...
djroge1 Posted April 26, 2011 Author Share 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? Link to comment Share on other sites More sharing options...
CajunBlues Posted April 26, 2011 Share 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... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.