Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import data from excel

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
I'm trying to import data from an excel file by:

right click on table -> all tasks -> import data -> ..and point to the source file. At the end it say successfully to import 1 table but when I open the database, the data is not in there.

During the transaction, when I click on "preview" to preview it, I can see the text data type columms but not the other datatype.

What is the solution for this? Thanks.
 
Other datatype are integer, date...
 
I have probably imported a couple of thousand xls spreadsheets through DTS. I have never ahd a problem with a numeric field. I have had problems with dates however. What I usually do is import the spreadsheet into an 'import' table where the date fields are defined as varchars. I then massage the data as needed in the 'import' table, and then transfer the data to its real home using an insert into ... select from ... statement.

In that select from I use convert to explicitly convert the varchar date info back into a datetime or smalldatetime field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top