zoukankan      html  css  js  c++  java
  • ETL 脚本任务

    Public Sub Main()
            '
            ' Add your code here
            '
            Dim sbWA As New StringBuilder
            Dim i As Integer
            Dim arWA As New Collections.ArrayList
            Dim bEOF As Boolean
            For Each r As DataRow In CType(Dts.Variables("dsWOACNBR").Value, DataSet).Tables(0).Rows
                i = i + 1
                bEOF = True
                sbWA.Append("','")
                sbWA.Append(r.Item(0).ToString + r.Item(1).ToString)

                If i Mod 100 = 0 Then
                    bEOF = False
                    Dim strWA As String = sbWA.ToString
                    strWA = strWA.Substring(3) '...移除"','"字符,后面计算长度时需补上

                    arWA.Add(strWA)

                    sbWA.Remove(0, strWA.Length + 3) '...清空时需补上"','"已移除字符的计数

                End If
            Next

            If bEOF = True Then
                Dim strWA As String = sbWA.ToString
                strWA = strWA.Substring(3) '...移除"','"字符,后面计算长度时需补上

                arWA.Add(strWA)

            End If


            Dts.Variables("arWOACNBR").Value = arWA

            Dts.TaskResult = Dts.Results.Success
        End Sub

  • 相关阅读:
    JSDI——实现数据库连接池(JDBC改进)
    MD5加密算法(实际应用)
    Java Web 自动登录
    异步编程设计模式Demo
    异步编程设计模式Demo
    禁止程序启动2次
    C#线程同步的几种方法
    ASP.NET MVC的Action Filter
    带有返回值的intent
    android 属性动画
  • 原文地址:https://www.cnblogs.com/lbnnbs/p/4781556.html
Copyright © 2011-2022 走看看