%@ LANGUAGE="VBScript" %>
<%
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Mode = adModeRead
Connection.Open phdb_rd
If Not IsEmpty(Request("moye")) Then
moye=CStr(Request("moye"))
SQLStmt = " select to_char(to_date('" & moye & "','MMYYYY'),'Month') cmonth,to_char(to_date('" & moye & "','MMYYYY'),'YYYY') cyear from dual"
' Response.write(SQLStmt & "
")
Set RS = Connection.Execute(SQLStmt)
cmonth=RS("cmonth")
cyear=RS("cyear")
Else
SQLStmt = " select to_char(sysdate,'Month') cmonth,to_char(sysdate,'YYYY') cyear,to_char(sysdate,'MMYYYY') moye from dual"
' Response.write(SQLStmt & "
")
Set RS = Connection.Execute(SQLStmt)
cmonth=RS("cmonth")
cyear=RS("cyear")
moye=CStr(RS("moye"))
End If
Set RS=nothing
'
' check last update time
'
SQLStmt="select to_char(logdate,'MM/DD/YYYY HH24:MI:SS') udate from secretary.latest_shift_update"
Set RS = Connection.Execute(SQLStmt)
udate=RS("udate")
Set RS=nothing
SQLStmt = " select to_char(sn.shift_date,'MM/DD/YYYY HH24:MI:SS') sd,to_char(sn.shift_date,'MM/DD/YYYY') sday,to_char(sn.shift_date,'Day') nday,st.shift_type, "
SQLStmt = SQLStmt & " lastname1 lc1,lastname2 lc2, "
SQLStmt = SQLStmt & " substr(firstname1,1,1) || '.' || ' ' || lastname1 l1, "
SQLStmt = SQLStmt & " substr(firstname2,1,1) || '.' || ' ' || lastname2 l2, "
SQLStmt = SQLStmt & " 24*(sn.shift_date-sysdate) hdif "
SQLStmt = SQLStmt & " from secretary.shift_names sn,secretary.shift_types st "
SQLStmt = SQLStmt & " where sn.shift_date between to_date('" & moye & "','MMYYYY') "
SQLStmt = SQLStmt & " and add_months(to_date('" & moye & "','MMYYYY'),1) "
SQLStmt = SQLStmt & " and sn.shift_date=st.shift_date "
SQLStmt = SQLStmt & " order by sn.shift_date "
' Response.write(SQLStmt & "
")
Set RS = Connection.Execute(SQLStmt)
%>
The table shows always the same time interval but the requirement for presence in the counting house will be different, depending on the shift level. Shift Levels are color-coded. The first (top) name is always a shift leader