super786
asked on
Import excel spreadsheet into Sql Server schema - numbers become exponentials: Why? Fix?
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.
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.
before inserting, format excel column as integer instead of text or general
Is SQL SERVER check how other number columns with large values are displayed. Change setting of SQL SERVER Database.
ASKER
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.