您的位置:首页 > 其它

自定义distinct 函数

2005-09-13 17:23 176 查看
function f_distinct(y)

dim S,D,x
x=split(y,",")
Set D = CreateObject("Scripting.Dictionary")
for each xxx in x
if not d.Exists(xxx) then D.Add xxx,xxx
next
for each key in D.Keys
S=S & key & ","
next
if instr(S,",")>0 then
S=left(S,len(s)-1)
end if
set D=nothing
f_distinct=trim(S)
end function 自定义distinct 函数,修改自大笨狼的函数,这个函数很方便.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: