response.addheader

response.addheaderselect *,max(date) from basic_group_fetch_max_date_row group by id;<%@LANGUAGE=”VBSCRIPT” CODEPAGE=”65001″%><%Response.ContentTyp

select *,max(date) from basic_group_fetch_max_date_row group by id;

response.addheader

<%@LANGUAGE=”VBSCRIPT” CODEPAGE=”65001″%>

<%

Response.ContentType = “text/html”

Response.AddHeader “Content-Type”, “text/html;charset=UTF-8”

Response.CodePage = 65001

Response.CharSet = “UTF-8”

%>

<%

function echo(s)

if asp=1 then

Response.Write(s)

else

debug.print s

end if

end function

function debugStart()

if asp=1 then

echo(“start<br>”)

ON ERROR RESUME NEXT

end if

end function

function initial_input_arr(blFromSheet)

if asp=1 or (blFromSheet=0) then

redim arr(3,3)

arr(1,1)=”1″

arr(1,2)=”2022-11-01″

arr(1,3)=”step1″

arr(2,1)=”1″

arr(2,2)=”2022-11-02″

arr(2,3)=”step2″

arr(3,1)=”2″

arr(3,2)=”2022-11-02″

arr(3,3)=”step2″

else

ws=”Sheet1″

arr=worksheets(ws).range(“A2”).currentregion

end if

initial_input_arr=1

end function

function show_arr(arr_input)

if asp=1 then

echo(“<table border=1>”)

For i=1 to Ubound(arr_input)

echo(“<tr>”)

For j=1 to Ubound(arr_input,2)

echo(“<td>”)

echo(arr_input(i,j))

call show_erro()

echo(“</td>”)

Next

Response.Write(“</tr>”)

next

Response.Write(“</table>”)

show_arr=1

end if

end function

sub show_erro()

if asp=1 then

If err.Number <> 0 Then

‘…you could display the error info directly in the page…

echo(“Error Description: ” & err.Description)

echo(“Error Source: ” & err.Source)

echo(“Error Number: ” & err.Number)

Response.End

End If

end if

End Sub

function myCreateObject(obj)

if asp=1 then

set myCreateObject=server.CreateObject(obj)

else

set myCreateObject=CreateObject(obj)

end if

end function

function show_each_key_of_d(dic)

if asp<>1 then

show_each_key_of_d=0

exit function

end if

Response.Write(“<table border=1>”)

for each k in dic.keys

if typeName(dic(k))=”classRow” then

Response.Write(“<tr><td>” & k & “</td><td>” & “dic(k)” & “</td></tr>” )

else

Response.Write(“<tr><td>” & k & “</td><td>” & dic(k) & “</td></tr>” )

end if

next

Response.Write(“</table>”)

show_each_key_of_d=1

end function

class classRow

Public RowId

Public key

Public function ToString()

ToString=RowId & “~” & key & “<br>”

end function

end class

function getRow(rowId,key)

set getRow=new classRow

getRow.RowId=rowId

getRow.key=key

end function

function getArrResult(d)

dim brr()

redim brr(d.count,Ubound(arr,2))

n=0

for each k in d.keys

n=n+1

rem echo(“k value:” & k)

set objR=d(k)

for c=1 to Ubound(arr,2)

brr(n,c)=arr(objR.RowId,c)

next

next

getArrResult=brr

end function

function arToRange(ar)

if asp=1 then

else

workbooks(“Sheet2”).[A2].resize(Ubound(ar),Ubound(ar,2))=ar

end if

end function

sub main()

dim d

set d=myCreateObject(“Scripting.dictionary”)

For i=1 to Ubound(arr)

if not d.exists(arr(i,1)) then

rem obtain date

set objR=getRow(i,arr(i,2))

set d(arr(i,1))=objR

else

set objR=d(arr(i,1))

if objR.key<arr(i,2) then

objR.key=arr(i,2)

objR.RowId=i

set d(arr(i,1))=objR

end if

show_erro()

end if

next

arResult=getArrResult(d)

echo(“original data”)

rem show_arr(arr)

echo(“Result”)

show_arr(arResult)

echo(“finish”)

arToRange(arResult)

end sub

dim asp

asp=1

dim arr

initial_input_arr(0)

main()

%>

2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/15249.html

(0)
上一篇 2024年 5月 18日
下一篇 2024年 5月 18日

相关推荐

关注微信