Hello,
How do I convert VBSCRIPT code in a DTS package which is used for data validation to SQL 2005 SSIS?
Thanks,
Michael
Michael,
There isn't really a tool to do that for you. Its a manual process I'm afraid.
If you explain what sort of data validation you want to do then you may find people on here will be able to help you achieve the same in SSIS.
-Jamie
|||
Hello,
I have a source table which contains some invalid dates (can be null, letters, etc). I want to check to see if the date is valid. If the date is valid then I want to use it. If the date is not valid then I went to set the destination field to null.
In the past I used vbscript code like
Dim dtStart
Dim dtEnd
Dim dtSource
dtStart = CDate("1/1/1753")
dtEnd = CDate("12/31/9999")
If Not IsNull(DTSSource("MyDate")) Then
If IsDate(DTSSource("MyDate")) Then
dtSource = CDate( DTSSource("MyDate"))
If dtSource >= dtStart and dtSource <= dtEnd Then
DTSDestination("MyDate") = DTSSource("MyDate")
end if
end if
end if
Main = DTSTransformStat_OK
Thanks,
Michael
No comments:
Post a Comment