• 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

  • 相关阅读:
    C# 读取JSON
    checkbox与说明文字无法对齐的问题
    C#判断一个string是否为数字
    C# 调用系统winmm.dll 播放音乐wav mp3
    C#导出EXCEL的几种方法
    C#遍历DataSet中数据的几种方法总结
    cookie 简单用法
    JQGrid 在页面加载时展开SubGrid
    Echarts 设置地图上文字大小及颜色
    Echarts 地图上显示数值
  • 原文地址:https://www.cnblogs.com/lbnnbs/p/4781556.html
Copyright © 2020-2023  润新知