Data Pull

-- =============================================
-- Engineer:
-- Create date:
-- Description:
-- =============================================

USE ODS

GO


DROP PROCEDURE IF EXISTS usp_PullYourDataSetNameData
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE usp_PullYourDataSetNameData
AS
BEGIN

--Remove processed records
DELETE FROM YourSchemaName.YourDataSetNameData WHERE IsProcessed = 1

--Use for wipe and refresh process
--TRUNCATE TABLE YourSchemaName.YourDataSetNameData

INSERT INTO YourSchemaName.YourDataSetNameData
(
--your tables here
)
--SQL pull here


END


Last updated