January 20, 2011 at 10:29 am
In SQL 2000, I use DTS to make transformer import text file to Table in DB, because the mapping field from text file to table is complex the I need to use ActiveX Script to check and convert between fields, let see my picture
Now I want to create transformer like that in SSIS of SQL 2008, but I don't know how to write add an ActiveX Script for that purpose.
Please help me. Thanks.
January 21, 2011 at 3:22 am
This was removed by the editor as SPAM
January 21, 2011 at 3:44 am
Yes, but how to use Script or Derived Column to make function like that of SQL 2000.
Please guide me.
Function Main()
if (DTSSource("ID")<>"" and DTSSource("CODE")= "123456" and isNumeric(DTSSource("INTERFACE"))) then
DTSDestination("DATETIME") = mid(DTSSource("DATE.TIME"),7,2) & "/" & mid(DTSSource("DATE.TIME"),5,2) & "/" & mid(DTSSource("DATE.TIME"),1,4) & " " & mid(DTSSource("DATE.TIME"),5,2) & ":" & mid(DTSSource("DATE.TIME"),7,2)
......
......
DTSDestination("ID") = DTSSource("ID")
Main = DTSTransformStat_OK
else
Main = DTSTransformStat_SkipRow
end if
End Function
January 21, 2011 at 6:24 am
This was removed by the editor as SPAM
January 21, 2011 at 8:41 am
I little bit confuse, what's difference source and destination column in your sample, you call "Row" but SQL 2000 separates "DTSSource" and "DTSDestination" ?
January 24, 2011 at 12:00 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply