![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Could someone help me with the Datetime DTS Transformation? I try to import the Text (fixed length) file into the SQL table and having problem when the date from the Text file is blank. I have two columns (from text file) with the dates in format yyyyMMdd. One of them always have valid dates, which go to the datetime column on the SQL table fine. The other one, it gives me an error on the first row containing blank in the Text file even though I allow null on that column. Is anyway I make it put "Null" in table if the import text is blank? Thanks very much in advance. Todoan -- Message posted via http://www.sqlmonster.com |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hi, Thanks for your reply. I still get the error. Could you tell me what did I do wrong? Here is my ActiveX script: Function Main() If DTSSource("Col031") = Space(8) Then DTSDestination("TermDate") = Null Else DTSDestination("TermDate") = DTSSource("Col031") End if Main = DTSTransformStat_OK End Function All the rows containing the valid date (in format YYYYMMDD), the error is: Error Source: Microsoft Data Transformation Services (DTS) Data Pump Error Description:ActiveX Scripting Transform 'DTSTransformation__17' encountered an invalid data value for 'TermDate' destination column. Error Help File:sqldts80.hlp Error Help Context ID:30632 @@SourceRow: Logged @@DestRow: Not Available Thank you very much for your time. --todoan -- Message posted via http://www.sqlmonster.com |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |