建議建個臨時表 如:temptable
CREAT TABLE TEMPTABLE(……)
字段: name , explain_add
設原表 table1
str1="select name,explain from table1"
set rs=conn.excute (str1)
if not rs.eof then
do while not rs.eof
tempname=rs("explain")
tempstr=rs("explain")
getstr=split(tempstr,";")
str2="insert into temptable (name,explain_add) values ('"&tempname&"','"&getstr(1)&"')"
conn.excute (str2)
rs.movenext
loop
end if
str3="select a.name,b.explain_add from table1 a, temptable b where a.name=b.name order by b.explain_add"
set rs3=conn.excute (str3)
……