Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to drop bad dates from excel file

Posted on 2011-09-22
1
Medium Priority
?
236 Views
Last Modified: 2012-05-12
Hi, what is the best way to drop a bad date within a ssis pkg.  I load data from an excel file into a sql server but sometimes the data is dirty, like a date field will come in ##### or 0222-01-01 00:00:00.000.  For these rows I want to load into tbl and the good rows into another tbl.  
I tried using the derived column task to make sure the data is actually a date, but get the following error.
Configure error or truncation dispositions to redirect rows to the error output(s), or delete data flow transformations or destinations that are attached to the error output(s).        
0
Comment
Question by:elucero
1 Comment
 
LVL 16

Accepted Solution

by:
vdr1620 earned 2000 total points
ID: 36582722
Are you getting the error at the source or at the Derived column? What expression are you using in the Derived Column...

I Think it is enough to check the year pattern of the Date column using a range like [2][0][0-9][0-9] Or [1-9][0][0-9][0-9] or use Year(Date column) >= 2011
which will eliminate the bad records , you can also check for # using the Codepoint function in the expression
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question