% Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수.. Dim arrValue(31) Dim arrData(33,2) YY = inputvalue(request("YY")) MM = inputvalue(request("MM")) DD = inputvalue(request("DD")) TT = inputvalue(request("TT")) If YY = "" and MM = "" and DD = "" and TT = "" then YY = Year(now) MM = Month(now) End If int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY) int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM) If Len(MM)=1 Then MM = "0"&MM 'table명 table = "sdk_mms_report_detail_" & Right(YY,2) & MM 'table 존재유무 sql = "select count(*) from information_schema.tables where table_name = '" & table & "'" Set rs = dbcon.execute( sql ) rscount = rs(0) Set rs = nothing '카운트 If rscount > 0 Then sql = "select count(*) from " & table Set rs = dbcon.execute( sql ) sumCount = rs(0) Set rs = nothing else sumCount = 0 End if If YY<>"" And MM<>"" Then temp_d = DateAdd("m",1, YY&"-"&MM&"-01") dataLength = Right(DateAdd("d", -1, temp_d ),2) Else dataLength = 31 End If For i=1 To dataLength arrValue(i) = 0 next '카운터수의 합 If rscount > 0 Then sql = "select count(*) as VCount, right(left(send_date,8),2) as vDD from " & table & " group by right(left(send_date,8),2)" Set Rs = Dbcon.Execute (sql) Do While Not rs.eof arrValue(CInt(rs("vDD"))) = rs("VCount") rs.movenext Loop rs.close : Set rs = Nothing End if maxCount = 0 minCount = 100000 For j=1 To dataLength arrData(j,0) = arrValue(j) ' 카운터 If sumCount > 1 then arrData(j,1) = (arrValue(j)/sumCount)* 100 if arrData(j,1) > 0 then arrData(j,1) = formatnumber(arrData(j,1),2) arrData(j,2) = (arrValue(j)/sumCount) * 550 else arrData(j,1) = 0 arrData(j,2) = 0 End if If minCount > arrValue(j) then minCount = arrValue(j) If maxCount < arrValue(j) then maxCount = arrValue(j) if arrData(j,0) = 0 then arrData(j,0) = "" End if if arrData(j,2) = 0 then arrData(j,2) = "" End if Next %>