Solved

Import excel spreadsheet into Sql Server schema - numbers become exponentials: Why? Fix?

Posted on 2007-04-09
4
2,084 Views
Last Modified: 2008-02-14
I have an excel spreadsheet that I import into a table in a SQL server schema. Once I import it, all the data appears perfectly EXCEPT a column (record_num), which has 6-8 digit numbers. On the Excel sheet this column displays the numbers just fine, but once I import it into a SQL table, the data in that column looks like this : "2.12043e+006" (instead of 2120426)

Now I looked at the SQL table's design and the data type is set to "varchar: 100"

If I re-format the column in excel as general, text, or number - I still get exponentials instead of the ACTUAL 6 or 8 digit number.

What am I missing? There's over 400 rows of data.
0
Comment
Question by:super786
  • 2
4 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 18876769
before inserting, format excel column as integer instead of text or general
0
 
LVL 16

Expert Comment

by:MohanKNair
ID: 18876802
Is SQL SERVER check how other number columns with large values are displayed. Change setting of SQL SERVER Database.
0
 
LVL 1

Author Comment

by:super786
ID: 18877588
Ok now its giving me another error. Seems as though now the record_num is working fine (I changed it to text). But the other problem I am having now is the date_column. My SQL design for the table for this column is datetime :8, as it also is on the spreadsheet. I try and import it and now it says the date_column is in incorrect format. I tried text, general...no help. I tried saving it as csv, but still doesn't work.

0
 
LVL 1

Accepted Solution

by:
super786 earned 0 total points
ID: 18877595
Oh and changing the design in of the SQL table is not an option (company rule)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Select JOIN table 2 19
MS Excel IF AND OR statement 3 27
Filling Blank Cells 14 19
Dynamic Filter ? 4 20
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now