![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In order to test the data from the source file, I changed the DTS load job to use an ActiveX script instead of just a copy. I noticed that data with a zero length string are getting converted to nulls and this is causing an issue. There is nothing in the command which tells it to do a conversion: DTSDestination("Segment") = DTSSource("Segment") Can a default control be set to prevent this from happening or do I have to change each line of code to something like: If DTSSource("Segment") = '' Then '' Else DTSDestination("Segment") = DTSSource("Segment") End If |
#3
| |||
| |||
|
|
I've encountered that issue as well. I'm pretty sure you have to code (as you did below) to handle the zero length strings. One thing to keep the amount of code down you could use: DTSDestination("Segment") = IIF(DTSSource("Segment") = "", "",DTSSource("Segment") ) Not always the easiet code to read, but it reduces the lines of code written. Jay rmcompute wrote: In order to test the data from the source file, I changed the DTS load job to use an ActiveX script instead of just a copy. I noticed that data with a zero length string are getting converted to nulls and this is causing an issue. There is nothing in the command which tells it to do a conversion: DTSDestination("Segment") = DTSSource("Segment") Can a default control be set to prevent this from happening or do I have to change each line of code to something like: If DTSSource("Segment") = '' Then '' Else DTSDestination("Segment") = DTSSource("Segment") End If |
![]() |
| Thread Tools | |
| Display Modes | |
| |