October 6, 2004 at 2:16 am
Please can anyone help me!!I have a couple of text files that I import into an SQL database with DTS. The problem is that in the textfiles certain fields have a ? if the value is null. This is a problem because when I import the file into sql the date fields complain that the date is out of bounds. I now have to firstly open the file in wordpad and do a find and replace on the file to replace all questionmarks with nothing. Is there a way to incorporate this find and replace with a script or process as part of the DTS package? Thanks.
October 6, 2004 at 3:20 pm
Try using an ActiveX script for the transformations on date columns. The VB scripting in ActiveX script will almost let you do anything you want.
October 7, 2004 at 9:14 am
As suggested above, you should be able to modify the transformation script of the data pump task. This checks for any invalid date values. Just edit this to include the correct input and output field names.
If IsDate(DTSSource("Col001")) Then DTSDestination("SQLDateField") = DTSSource("Col001")
Else DTSDestination("SQLDateField") = Null
End If
Jeff
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply