How to use ActiveX Script in SSIS

  • 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.

  • This was removed by the editor as SPAM

  • 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

  • This was removed by the editor as SPAM

  • I little bit confuse, what's difference source and destination column in your sample, you call "Row" but SQL 2000 separates "DTSSource" and "DTSDestination" ?

  • 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