Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DTS Import and Data Type

Author  Topic 

nic
Posting Yak Master

209 Posts

Posted - 2003-02-19 : 16:42:44
Hi,
I'm trying to import an Excel file into sql2k table but am running into big problems. One of the columns contains numeric and text data. The column in the database is a varchar(10). For some reason when I go through the DTS wizard it says the data type for the column in Excel is a double. When I hit the preview pane, it shows the future import but all records that are not numeric are blank/null. When I run the import, it errors out since that column can't be null. I have tried setting the format in the Excel file to be 'Text' and'General', and I have also copied and pasted the data into a new Excel file. For some reason DTS always reads it as a double and won't copy over the non numeric data.

Also we can a data column that can contain the date '9/9/9999' (future end date) be it also errors out saying it is outside the date range. Sql can handle this data range so I don't see why the data won't import.

Any idea what is going on????

Nic

Edited by - nic on 02/19/2003 16:51:16

X002548
Not Just a Number

15586 Posts

Posted - 2003-02-19 : 16:51:30
Did You Click on the Transformations elipsis (...) for each column? Just change the datatype their...I'm assuming your use the import wizard

Hope this helps

Brett



Go to Top of Page

nic
Posting Yak Master

209 Posts

Posted - 2003-02-19 : 16:55:45
Hi Brett,

You can't change the datatype of the base table in the transformation section (or at least I don't see how). I can change which column imports (to which table etc) but not the actual data type.

hmmmm maybe I'm missing something

Nic

Edited by - nic on 02/19/2003 16:56:46
Go to Top of Page
   

- Advertisement -