![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I keep getting the error The number of failing rows exceeds the maximum specified Insert error, column 16('DateX', DB_TYPE_DBTIMESTAMP), status 6: Data overflow. Invalid character value for cast specification. I have the following code in my VB script to capture invalid dates. It is working fine in the test but it's not working when I load the real data at the DTS. Below is my script that I have modified from the link of http://www.sqldts.com/default.aspx?6,103,249,0,1 '************************************************* ********************* ' Visual Basic Transformation Script '************************************************* *********************** ' Copy each source column to the destination column Function Main() dim i_Day dim i_Month dim i_Year i_Day = CInt(Left( DTSSource("Need By Date"), 2 )) i_Month = CInt(Mid( DTSSource("Need By Date") ,4, 2 )) i_Year = CInt(Right(DTSSource("Need By Date"),4)) DTSDestination("NEED_BY_DATE") = DateSerial( i_Year , i_Month ,i_Day ) Main = DTSTransformStat_OK End Function Thanks in advance help. -- Message posted via http://www.sqlmonster.com |
#3
| |||
| |||
|
|
I keep getting the error The number of failing rows exceeds the maximum specified Insert error, column 16('DateX', DB_TYPE_DBTIMESTAMP), status 6: Data overflow. Invalid character value for cast specification. I have the following code in my VB script to capture invalid dates. It is working fine in the test but it's not working when I load the real data at the DTS. Below is my script that I have modified from the link of http://www.sqldts.com/default.aspx?6,103,249,0,1 '************************************************* ********************* ' Visual Basic Transformation Script '************************************************* *********************** ' Copy each source column to the destination column Function Main() dim i_Day dim i_Month dim i_Year i_Day = CInt(Left( DTSSource("Need By Date"), 2 )) i_Month = CInt(Mid( DTSSource("Need By Date") ,4, 2 )) i_Year = CInt(Right(DTSSource("Need By Date"),4)) DTSDestination("NEED_BY_DATE") = DateSerial( i_Year , i_Month ,i_Day ) Main = DTSTransformStat_OK End Function Thanks in advance help. -- Message posted via http://www.sqlmonster.com |
#4
| |||
| |||
|
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
#9
| |||
| |||
|
|
i`m trying to use that simple code but it won`t works. my source data is varchar for exmple '20050101' and destination is smalldatetime But i`m still getting an error with OVERFLOW. What`s wrong? Thanks for advice, Matex |
![]() |
| Thread Tools | |
| Display Modes | |
| |