• 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

  • 相关阅读:
    Libgdx 截屏功能
    Tomcat+Spring+Quartz Restart or shutdown error
    JSP 基础知识
    Git 常用命令备忘
    Java 基础知识点
    Android adb 命令的基础知识
    在 Cygwin 环境下使用 linux 命令(2)
    Libgdx Pixmap 的使用
    Android 平台开发一些基础知识
    Cygwin 安装列表
  • 原文地址:https://www.cnblogs.com/lbnnbs/p/4781556.html
Copyright © 2020-2023  润新知