Solved

how to drop bad dates from excel file

Posted on 2011-09-22
1
233 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

624 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