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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Import Field with various data types
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sross81
Posting Yak Master

USA
228 Posts

Posted - 12/20/2012 :  14:05:14  Show Profile  Reply with Quote
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

USA
228 Posts

Posted - 12/20/2012 :  17:06:07  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 12/21/2012 :  00:39:52  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000