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 2008 Forums
 SSIS and Import/Export (2008)
 Import Field with various data types

Author  Topic 

sross81
Posting Yak Master

228 Posts

Posted - 2012-12-20 : 14:05:14
Hello,
I have an excel spreadsheet that I get from an outside source that I need to import into a database. It has 4 fields, 2 formatted as date and 2 formatted as time. If the date or time is not determinable but whoever inputs the data the value will come back as UTD instead of a date or time.

When I import using my SSIS package sometimes it takes the value in as UTD or date for example for a field, but many times it just drops it off and leaves all the dates, but for UTD it will insert a value of NULL.

I've tried the IMEX=1 one into the connection string and tried changing the data types of the fields in excel.

I am looking for ideas. I am new to using SSIS.

Thank you.

Thanks in Advance!
Sherri

sross81
Posting Yak Master

228 Posts

Posted - 2012-12-20 : 17:06:07
I ended up just saving the excel file as a text file and then importing it as all text in a tab delimted format. That is a fix until I can get the vendor to just send me a text file.

Thanks in Advance!
Sherri
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-12-21 : 00:39:52
SSIS doesnt allow you to change datatypes at runtime so you've bring them all as text or make them all either UTD or date values

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -