SELECT dbo.blogMark.ID, dbo.blog.blogID, dbo.blog.subject, dbo.blog.author,
      dbo.blog.content, dbo.blog.replys, dbo.members.netWork, dbo.blog.lastUpdateTime,
      dbo.blog.secrecy, dbo.blog.isDraft, dbo.members.headPath,
      dbo.members.headName, dbo.blogMark.userName, dbo.members.headState,
      dbo.members.nickName
FROM dbo.blogMark INNER JOIN
      dbo.blog ON dbo.blogMark.blogID = dbo.blog.blogID INNER JOIN
      dbo.members ON dbo.blog.author = dbo.members.userName

<%
Call bubble("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30","3,4,5,8,10,15,16,17,18")

Sub bubble(s1, s2)
    Dim i, strS1Temp, strS2Temp
    Dim strTemp
    Dim strInsert
    Dim strTimeStart, strTimeEnd
    s1 = s1 & ","
    s2 = s2 & ","
    '开始时间
    Response.Write "s1="& s1 &"<br />"
    Response.Write "s2="& s2 &"<br />"
    strTimeStart = Now()

    Do While Len(s2) > 0
        i = InStr(1, s2, ",")
        If i > 0 Then
            strS2Temp = Left(s2, i - 1)
            s2 = Right(s2, Len(s2) - i)
            strTemp = s1
            s1 = ""
            Do While Len(strTemp)
                i = InStr(1, strTemp, ",")
                If i > 0 Then
                    strS1Temp = Left(strTemp, i - 1)
                    strTemp = Right(strTemp, Len(strTemp) - i)
                    If strS2Temp <> strS1Temp Then
                        s1 = s1 & strS1Temp & ","
                    Else
                        strInsert = strInsert & strS1Temp & ","
                    End If
                End If
            Loop
        End If
    Loop
   
    strTimeEnd = Now()
    Response.Write "找到数据:"& strInsert
    Response.Write "删除数据:"& s1
    Response.Write "开始时间:"& strTimeStart &"<br />" 
    Response.Write "结束时间:"& strTimeEnd &"<br />"
    Response.Write "总共用时:"& DateDiff("s", strTimeStart, strTimeEnd) &" 秒"

End Sub
%>