Properties
Creation Date | 9/25/2015 5:17 PM |
Encrypted |  |
Ansi Nulls |  |
Procedure Source Code
--procedure for clearing the EEGeocodeTracker Results Cache
create procedure dbo.GS_EEGeocodeTrackerClearCache (@EmployeeView varchar(150)) as
BEGIN
DECLARE @cmd as NVARCHAR(max)
SET @cmd = 'delete GS_EEGeocodeTrackerResultUncertainPossibilities from GS_EEGeocodeTrackerResults r
left join GS_EEGeocodeTrackerResultSuggestions s on r.EmployeeID = s.EmployeeID
left join GS_EEGeocodeTrackerResultJurisdictions j on r.EmployeeID = j.EmployeeID
left join GS_EEGeocodeTrackerResultUncertainPossibilities p on r.EmployeeID = p.EmployeeID
inner join ' + @EmployeeView + ' e on r.EmployeeID = e.EMPLOYID'
exec sp_executesql @cmd
SET @cmd = 'delete GS_EEGeocodeTrackerResultJurisdictions from GS_EEGeocodeTrackerResults r
left join GS_EEGeocodeTrackerResultSuggestions s on r.EmployeeID = s.EmployeeID
left join GS_EEGeocodeTrackerResultJurisdictions j on r.EmployeeID = j.EmployeeID
left join GS_EEGeocodeTrackerResultUncertainPossibilities p on r.EmployeeID = p.EmployeeID
inner join ' + @EmployeeView + ' e on r.EmployeeID = e.EMPLOYID'
exec sp_executesql @cmd
SET @cmd = 'delete GS_EEGeocodeTrackerResultSuggestions from GS_EEGeocodeTrackerResults r
left join GS_EEGeocodeTrackerResultSuggestions s on r.EmployeeID = s.EmployeeID
left join GS_EEGeocodeTrackerResultJurisdictions j on r.EmployeeID = j.EmployeeID
left join GS_EEGeocodeTrackerResultUncertainPossibilities p on r.EmployeeID = p.EmployeeID
inner join ' + @EmployeeView + ' e on r.EmployeeID = e.EMPLOYID'
exec sp_executesql @cmd
SET @cmd = 'delete GS_EEGeocodeTrackerResults from GS_EEGeocodeTrackerResults r
left join GS_EEGeocodeTrackerResultSuggestions s on r.EmployeeID = s.EmployeeID
left join GS_EEGeocodeTrackerResultJurisdictions j on r.EmployeeID = j.EmployeeID
left join GS_EEGeocodeTrackerResultUncertainPossibilities p on r.EmployeeID = p.EmployeeID
inner join ' + @EmployeeView + ' e on r.EmployeeID = e.EMPLOYID'
exec sp_executesql @cmd
END
|
See Also