--INSERT INTO IPDV_PROC_EXEC (PROC_NAME) VALUES ('P_GERA_RC_DEB_CLI_PDV')
--SELECT * FROM IPDV_PROC_EXEC
IF OBJECT_ID('IPDV_PROC_EXEC') IS NULL
BEGIN
CREATE TABLE IPDV_PROC_EXEC
(
	ID	INT	IDENTITY(1,1) PRIMARY KEY,
	PROC_NAME SYSNAME NOT NULL,
	DT_CAD DATETIME NOT NULL DEFAULT GETDATE(),
	ULT_EXEC DATETIME NULL,
	ERROR BIT NULL,
	ERROR_MSG NVARCHAR(1000)
)

CREATE UNIQUE INDEX UK_IPDV_PROC_EXEC ON IPDV_PROC_EXEC(PROC_NAME) INCLUDE (ID)

END
