以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]从二张表中用SqlGetComboListString如何取得不重量的值  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=151661)

--  作者:huangfanzi
--  发布时间:2020/6/30 14:22:00
--  [求助]从二张表中用SqlGetComboListString如何取得不重量的值
e.Sender.Combolist = "全选|" & _dt第三方结算.SqlGetComboListString("我方简称" ," [审核] = 1") & "|" & _dt收支录入.SqlGetComboListString("我方简称" ," [收支属性] = \'第三方\' And [审核] = 1")
上面的代码是从二张表中取值,但是存在重复值,如何处理下把重复的值去掉,谢谢老师!

--  作者:有点蓝
--  发布时间:2020/6/30 14:27:00
--  
dim lst as list(of string) =  _dt第三方结算.SqlGetvalues("我方简称" ," [审核] = 1")
for each s as string in _dt收支录入.SqlGetvalues("我方简称" ," [收支属性] = \'第三方\' And [审核] = 1")
if lst.contains(s) = false then lst.add(s)
next

e.Sender.Combolist = "全选|" & string.join("|",lst.toarray)