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.
Author |
Topic |
rajiv460
Starting Member
3 Posts |
Posted - 2010-12-21 : 12:55:30
|
Hi,I have a question. I am writing a Change Data Capture Package for a Table I have a column in the source which is of Char(21) dataype. I need to Cast it to datetime before inserting it into the target.Cast(Column as Datetime) should work but the problem is that the data in this column is following different formats. They are given below.YYYYMMDD(Example: 20051002)(Most of the Data is in this format)MM/DD/YY.(Example:03/24/97)(About 3% of the data is in this format)But the some data(About 1-2%) in this column is corrupt like '2001020', which doesnt really point to any date. The rows with these kinds of errors need to be redirected into a flat file.So I used a data conversion transformation (converted to DT_Date)on this coulmn and directed the Success flows to the subsequent transformations and the error outputs to a flat file. But when I run the task, only 4 rows out of 4000 rows are successful and the remaining rows are being direccted into the error flat file. I used a data viewer to see why this is happening and found the following error description at the end of each row. "The data value cannot be converted for reasons other than sign mismatch or data overflow." So what could be the problem?? Pls help me out.Rajiv V |
|
|
|
|