% dim title dim Query dim tmpstr2 dim i dim max_cnt '문서내용 테이블에서 원하는 문서를 가져온 갯수 dim txt_date '출퇴근보고서 작성시 사용되는 시작일자 dim db_table_name dim Currdate dim sel_month Currdate = year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) db_table_name = "문서내용" title=request("title") txt_date = request("txt_date") sel_month = request("sel_month") if trim(sel_month) = "" then sel_month = mid(date,1,7) end if '문서번호의 년도가 현년도 인것만 보기 query = "select * from " & db_table_name If title = "신규 지출결의서" then query = query & " where 문서제목 ='지출결의서' " query = query & " and target16 is not null " Else query = query & " where 문서제목 ='" & title & "' " End If query = query & " and login_p_no = '" & Session("User_Number") & "'" if title = "접대비보고서" then query = query & " and (convert(varchar(7), target3) = '" & sel_month & "' " else query = query & " and (substring(발급일,1,7) = '" & sel_month & "' " end if query = query & ") and del_yes_no = 'no' order by 문서번호 desc, 발급시각 desc" adors.open query, adoconn, adopenstatic, adlockreadonly %>