Solved

how to drop bad dates from excel file

Posted on 2011-09-22
1
225 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 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now