home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
moodle.waes.ac.uk
/
moodle.waes.ac.uk.zip
/
moodle.waes.ac.uk
/
TMG
/
SP1-TMG-KB981324-AMD64-ENU.msp
/
PCW_CAB_SHFx2
/
F2143_msfpcui.dll
/
BINARY
/
25121
< prev
next >
Wrap
Text File
|
2010-06-15
|
1KB
|
39 lines
CREATE PROCEDURE [ISA_spApplicationSummary]
AS
BEGIN
SET NOCOUNT ON;
IF OBJECT_ID ('TblApplicationSummary', 'u') IS NOT NULL
DROP TABLE [TblApplicationSummary]
DECLARE @FromDate datetime
SET @FromDate = (SELECT [FromDate] FROM [tblSummaryParams])
IF OBJECT_ID ('FWS_LOGS', 'view') IS NOT NULL
BEGIN
SELECT
CASE
WHEN [ClientAgent] = N'-'
THEN N'{[23132]}'
WHEN PATINDEX('%:%',[ClientAgent]) <= 0
THEN N'{[23049]}'
ELSE LOWER(LEFT([ClientAgent], PATINDEX('%:%',[ClientAgent]) - 1))
END AS [ApplicationName],
COUNT(*) AS Requests,
@FromDate AS Date
INTO [TblApplicationSummary]
FROM FWS_LOGS
WHERE
([Action] != 8) AND
([Action] != 10) AND
([Action] != 11) AND
([InternalServiceInfo] & 2) = 0
GROUP BY
CASE
WHEN [ClientAgent] = N'-'
THEN N'{[23132]}'
WHEN PATINDEX('%:%',[ClientAgent]) <= 0
THEN N'{[23049]}'
ELSE LOWER(LEFT([ClientAgent], PATINDEX('%:%',[ClientAgent]) - 1))
END
END
INSERT INTO [tblSummaryTables] ([TableName]) VALUES ('TblApplicationSummary')
END