Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Import from excel

Posted on 2010-09-03
2
215 Views
Last Modified: 2012-05-10
I am trying to import into SQL server using the wizard an excel file.  both columns have mixed numbers and letters.  The first column imports correctly but the second column imports only cells with only numbers.  What am I doing wrong?
0
Comment
Question by:mak3366
2 Comments
 
LVL 6

Accepted Solution

by:
dan_mason earned 500 total points
ID: 33596910
If there is a way you can sort the Excel file so that the top value in both columns is not a number, I believe that should fix the problem - more of a workaround than a solution.

The better way is probably to use a script in SQL that uses the 'BULK INSERT' method ; that should ensure that all data is carried across, though it will often need some additional manipulation afterwards to get it the way you want.
0
 

Author Closing Comment

by:mak3366
ID: 33597166
I used your idea and built on it.  If I did what you said to do it still would skip one once in a while with letters in it.  So I just did two imports one with only the cells that had numbers only and the other with cells that had both. And it worked find...

Thanks
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query - which index being used? 2 60
Help with simplifying SQL 6 54
Replace Dates in query 14 51
How do I subtract date and time within a same column in SQL 4 41
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question