Created
September 9, 2018 06:02
-
-
Save smaglio81/764cbd996c075ac781d34649b485c6e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use IisLogs | |
go | |
declare @dateStart varchar(10) = '2018-08-01', | |
@dateEnd varchar(10) = dateadd(d, 1, '2018-09-01'), | |
@includeAll bit = 1; | |
insert into dbo.IisLogWebAppId | |
select EntryTime, LogFilename, RowNumber, | |
dbo.fn_FindWebAppId([SiteName], csUriStem) [webAppId] | |
from dbo.IisLog | |
where ( | |
(EntryTime >= @dateStart and EntryTime < @dateEnd) | |
or @includeAll = 1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment