Dim strs() As String = {"n1","n2","n3"}
Dim strs1() As String = {"货币资金","应收账款","应收账款坏账准备"}
\'Dim strs2() As String = {}
\'会计科目中提取\'货币资金\'的科目代码
For i As Integer = 0 To strs.Length-1
Dim lst As List(of String) = DataTables("会计科目").GetValues("科目代码","资产负债表 like \'" & strs1(i) & "," & "% \' or 资产负债表 like \'% " & "," & strs1(i) & " \'")
Dim str As String
For Each ids As String In lst
str & = ids & ","
Next
str = str.Trim(",")
Dim x As Double = tb2.sqlCompute("sum(余额)","科目代码 in (" & str & ") And 摘要 = \' 本 年 累 计\' and 会计期间 = \'" & Vars("会计期间") & "\' ")
\'output.show(str)
output.show(x)
Next