dbTalk Databases Forums  

Dealing with BAD Data in SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Dealing with BAD Data in SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
robboll
 
Posts: n/a

Default Dealing with BAD Data in SSIS - 06-24-2010 , 10:47 AM






I have a simple table with five columns. One of the column is a
date.

When I import the data into a datetime field I get the error: An OLE
DB error has occurred. Error code: 0x80004005. Description:
"Invalid character value for cast specification".

As it turns out the error occurs when it hits a date with this value
"00/00/0000"

Can anyone suggest a method of dealing with this issue?

Thank you!

RBollinger

Reply With Quote
  #2  
Old   
robboll
 
Posts: n/a

Default Re: Dealing with BAD Data in SSIS - 06-27-2010 , 03:19 AM






Anyone familiar with RegexClean? I just imported the add-in
transformations to take care of these type of data issues.

Reply With Quote
  #3  
Old   
Gorm Braarvig
 
Posts: n/a

Default Re: Dealing with BAD Data in SSIS - 07-06-2010 , 05:52 AM



to solve this in SSIS
- import as strings
- cast to date and redirect error rows

there are ways to fix this in SQL (the source statement) if you need better
performance, but easier is usually better...

hope this helps
Gorm

"robboll" <robboll (AT) hotmail (DOT) com> wrote

Quote:
I have a simple table with five columns. One of the column is a
date.

When I import the data into a datetime field I get the error: An OLE
DB error has occurred. Error code: 0x80004005. Description:
"Invalid character value for cast specification".

As it turns out the error occurs when it hits a date with this value
"00/00/0000"

Can anyone suggest a method of dealing with this issue?

Thank you!

RBollinger

Reply With Quote
  #4  
Old   
Ryan.Guan(管悦)
 
Posts: n/a

Default Re: Dealing with BAD Data in SSIS - 07-14-2010 , 09:37 AM



did you use cast in the sql query ?
Please check the data type.
or you can give a default value (TO_DATE()) for this column.


"robboll" <robboll (AT) hotmail (DOT) com> 写入消息
news:c9733942-16f3-4a32-83e7-1585d9f8022e (AT) d16g2000yqb (DOT) googlegroups.com...
Quote:
I have a simple table with five columns. One of the column is a
date.

When I import the data into a datetime field I get the error: An OLE
DB error has occurred. Error code: 0x80004005. Description:
"Invalid character value for cast specification".

As it turns out the error occurs when it hits a date with this value
"00/00/0000"

Can anyone suggest a method of dealing with this issue?

Thank you!

RBollinger

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.