% Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수.. Dim curCount(12) Dim arrData(12,2) YY = inputvalue(request("YY")) MM = inputvalue(request("MM")) 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 totalCount = 0 sumCount = 0 For i = 1 To 12 curCount(i) = 0 MM = Right( "0" & i, 2) '//table명 table = "sdk_mms_report_detail_" & Right(YY,2) & MM '//table 존재유무 sql = "select count(*) as cnt from information_schema.tables where table_name = '" & table & "'" Set rs = dbcon.execute( sql ) rscount = rs("cnt") Set rs = nothing If rscount > 0 then '//월별 카운터를 구한다 qry = "select count(*) as vC from " & table Set rs = dbcon.execute( qry ) arr = i VC = rs("vC") curCount(arr) = VC sumCount = sumCount + VC else arr = i VC = 0 curCount(arr) = VC sumCount = sumCount + VC End if next ' 날짜변 데이터를 배열에 담는다 maxCount = 0 minCount = 100000 For i=1 To UBound(curCount) If sumCount > 0 then curSize = int((curCount(i)/sumCount) * 540) curPer = formatnumber((curCount(i)/sumCount) * 100,2) else curSize = 0 curPer = 0 End if if maxCount < curCount(i) then maxCount = curCount(i) End if if minCount > curCount(i) then minCount = curCount(i) End if arrData(i,0) = curCount(i) arrData(i,1) = curSize arrData(i,2) = curPer if arrData(i,0) = 0 then arrData(i,0) = "" End if if arrData(i,2) = 0 then arrData(i,2) = "" End if next %>