<%
'Option Explicit
dim CmdText ' SQL statement
dim RsTemp ' recordset object
dim gObjTxn 'Transcation Object COM
dim strSql
dim Idx
dim DispStyle
dim DATA_STR_DT
dim DATA_END_DT
dim Sch_Str_Time
dim Schedule_Finish
dim Job_Failure
dim Over_Run_Time
dim Temp_Sch_Time
dim IP_ID
dim strUser <!--.201301-->
Response.Expires = 0
Response.Buffer = False
%>
<%
'建立資料庫連結
set gObjTxn=Server.CreateObject("prjPublic.clsMenu")
set RsTemp=Server.CreateObject("ADODB.Recordset")
'set CkFileExist=Server.CreateObject("Scripting.FileSystemObject")
DATE_STR_DT = trim(Request ("DATE_STR"))
DATE_END_DT = trim(Request ("DATE_END"))
strUser = Session("User")
strSql="select ip_id,Sch_Str_Time,sum(Schedule_Finish),sum(Job_Failure),sum(Over_Run_Time) from (select b.ip_id,b.Sch_Str_Time,decode(b.job_status,'Schedule Finish',count(*)) Schedule_Finish,decode(b.job_status,'Job ailure',count(*)) Job_Failure,decode(b.job_status,'Over Run-Time',count(*)) Over_Run_Time from grp_tib_job_config a,grp_tib_job_monitor b, grp_tib_user c where a.schema_owner = 'MM' and c.user_id = '"&strUser&"' and c.COMPANY_ID=b.ip_id and a.ip_id=b.ip_id and b.Sch_Str_Time between '"& left(DATE_STR_DT,12) &"' and '"& left(DATE_END_DT,12) &"' group by b.Sch_Str_Time,b.job_status, b.ip_id) group by Sch_Str_Time, ip_id"
%>
Ref: 1.ASP 實例引導-李宗憲老師←(搜尋:(五)、注意事項看,第五個黑點)、
2.前輩的無字天書文件...
2013年1月25日 星期五
New
[ASP][Session] 透過Session擷取使用者帳號,並塞值進SQL command line
Session
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言
問題沒有大小或好壞