GreenshadesOnline Integration Help
dbo.GS_EEGeocodeTrackerClearCache Stored Procedure
Properties
Creation Date9/25/2015 5:17 PM
Encrypted
Ansi Nulls
Parameters
ParameterDirectionDescriptionData TypeSize
@EmployeeViewIn varchar150
@RETURN_VALUEReturn Value int4
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

Related Objects

dbo Schema
SQL Objects Database

 

 


© 2015 All Rights Reserved.

Send comments on this topic.