Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

?-- =============================================
-- Description: Returns list of CCNRegion to tie into the reporting.
--
-- Maintenance Log:
--
-- Update By Update Date Description
-- ----------- --------- ----------------------------
-- =============================================
CREATE PROCEDURE seclyr.[uspRptGetUserCCNRegionsList]
@userId int,
@moduleIds varchar(max)
AS
DECLARE @resultsTable table
(
RowID int,
ModuleID tinyint,
RegionID tinyint,
RegionCode varchar(10),
RegionName varchar(50),
Inactive bit
)

BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

BEGIN TRY

INSERT INTO @resultsTable (RowID, ModuleID, RegionID, RegionCode, RegionName, Inactive)
EXEC seclyr.uspGetUserCCNRegions @userId, @moduleIds;

SELECT DISTINCT
RegionID
, RegionCode
, RegionName
FROM @resultsTable
--uncomment the next line if need to do single select and have an "all" CCNRegions
--UNION SELECT 0 AS CCNRegionID, NULL AS CCNRegionCode, '[All]' AS 'CCNRegionName'
ORDER BY RegionID, RegionName
;
END TRY
BEGIN CATCH
PRINT 'There was an while getting user CCN Region reporting list' + CHAR(13);
SELECT * FROM dbo.ufnGetErrorInfo();
EXEC uspRaiseErrorInfo;
END CATCH
END
GO