This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @ver = CHANGE_TRACKING_CURRENT_VERSION() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM CHANGETABLE(CHANGES dbo.Emp, @ver) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT dbo.Emp VALUES ('Joey' ,NULL ,'Tribbiani') | |
INSERT dbo.Emp VALUES ('Chandler' ,NULL, 'Bing') | |
INSERT dbo.Emp VALUES ('Ross',NULL,'Geller') | |
INSERT dbo.Emp VALUES ('Monica',NULL,'Geller') | |
INSERT dbo.Emp VALUES ('Rachel',NULL,'Green') | |
INSERT dbo.Emp VALUES ('Phoebe',NULL,'Buffay') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CHANGE_TRACKING_CURRENT_VERSION() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE [dbo].[Emp] | |
ENABLE change_tracking WITH (track_columns_updated = ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE Emp | |
( | |
ID INT PRIMARY KEY IDENTITY(1, 1), | |
FirstName VARCHAR(100), | |
MiddleName VARCHAR(100), | |
LastName VARCHAR(100) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void CreateNewOutputRows() | |
{ | |
// All I need to do in this script component is to cast the object variable to a DataTable | |
DataTable dt = (DataTable)Variables.vResults; | |
// The DataTable is now ready to use! No more recordset quirks. | |
foreach (DataRow dr in dt.Rows) | |
{ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Main() | |
{ | |
// Set up the DataAdapter to extract the data, and the DataTable object to capture those results. | |
// This will write the contents of the Recordset to a new DataTable object. | |
OleDbDataAdapter da = new OleDbDataAdapter(); // Create the connector | |
DataTable dt = new DataTable(); // Create the output DataTable | |
da.Fill(dt, Dts.Variables["vResults"].Value); // Load the DataTable | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE SSISDB; | |
GO | |
DECLARE @execution_id BIGINT; | |
EXEC [SSISDB].[catalog].[create_execution] | |
@package_name = N'DEMO SFTP List.dtsx' | |
, @execution_id = @execution_id OUTPUT | |
, @folder_name = N'SSIS Parameters' | |
, @project_name = N'SSIS Parameters' | |
, @use32bitruntime = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRAN | |
INSERT #idtest | |
VALUES ('Hop') | |
, ('Skip') | |
, ('Jump') | |
ROLLBACK TRAN |