%@ LANGUAGE="VBScript" %> <% time_start=Now() ' ' Declare Variables ' Dim c dim dv(1,6) dim run dim sequence dim ntype dim dv_type(6) ' 'dv_type(i) dv_type 'ntypes=count of dv_type 'c = count 'dv(0,c) dv quality 'dv(1,c) dv status ' If Request("run_min")<>"" Then run_min=CInt(Request("run_min")) Else run_min=6150 End If If Request("run_max")<>"" Then run_max=CInt(Request("run_max")) Else run_max=6150 End If ' ' Open Database ' Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd statement = " select dv_type from phoffline.dv_type order by dv_type " set RS = Connection.Execute(statement) ntype=0 do while not RS.EOF dv_type(ntype) = Cstr(RS("dv_type")) ntype = ntype + 1 RS.Movenext loop set RS=nothing SQLtmt = "select xx.run ,xx.sequence ,xx.dv_type,dq.quality , xx.status from phoffline.dv_quality dq," SQLtmt = SQLtmt & "(select rs.run,rs.sequence,dt.dv_type, rs.status from phoffline.dv_type dt," SQLtmt = SQLtmt & "phoffline.runseqs rs where rs.run between " & cstr(run_min)& " and " & cstr(run_max)&") xx where xx.run=dq.run(+)and xx.sequence=dq.sequence(+)" SQLtmt = SQLtmt & " and xx.dv_type=dq.dv_type(+) order by run, sequence, dv_type" set RS = Connection.Execute(SQLtmt) %>
| RUN | SEQUENCE | <% For i=0 to ntype-1 Response.write(""& dv_type(i) &" | ") next %>STATUS |
| " & run & " | ") response.write(""& sequence &" | " & vbcrlf) For i=0 to c-1 Response.write(""& dv(1,i) &" | ") next response.write(""& dv_status &" |