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 table of BatchLog records awaiting loading for the load status provided
--
-- Maintenance Log:
--
-- Update By Update Date Description
-- ----------- --------- ----------------------------
-- =============================================
CREATE FUNCTION [dbo].[ufnGetBatchLogBatchDate]
(
@loadStatus varchar(50),
@tableName varchar(50)
)
RETURNS @resultTable table
( BatchLogID bigint,
TableName varchar(50),
BatchDate datetime2(7)
)
AS
BEGIN
INSERT INTO @resultTable (BatchLogID,TableName, BatchDate)
SELECT DISTINCT BatchLogID, TableName, BatchDate
FROM BatchLogs
WHERE (LoadStatus = @loadStatus OR @loadStatus Is Null)
AND (TableName = @tableName OR @tableName Is Null)
ORDER BY BatchDate;

RETURN;
END
GO