%@ LANGUAGE="VBScript" %>
<%
c_year=request("year")
c_month=request("month")
'
' get Current month
'
if len(c_year)<>4 Then
c_year=CStr(Year(Now))
End If
If c_month="" Then
c_month=CStr(Month(Now))
End If
If len(c_month)=1 Then
c_month="0" & c_month
End If
'
' get Next month
'
i_month=CInt(c_month)+1
If Not i_month>12 Then
i_year=CInt(c_year)
Else
i_month=1
i_year=CInt(c_year)+1
End If
n_year=CStr(i_year)
n_month=CStr(i_month)
If len(n_month)=1 Then
n_month="0" & n_month
End If
c_ym=c_year & c_month
n_ym=n_year & n_month
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Mode = adModeRead
Connection.Open phdb_rd_repl
SQLStmt0 = "select to_char(to_date(c_day,'YYYYMMDD'),'DD-MON-YYYY') d_day,c_day from"
SQLStmt0 = SQLStmt0 & " (select distinct to_char(log_date,'YYYYMMDD') c_day from phoffline.log_entries where action like '%SHIFT%' "
SQLStmt0 = SQLStmt0 & " and log_date>=to_date('" & c_ym & "','YYYYMM') "
SQLStmt0 = SQLStmt0 & " and log_date< to_date('" & n_ym & "','YYYYMM')) "
'
response.write(SQLStmt0 & "
" )
'
Set RS0 = Connection.Execute(SQLStmt0)