Database Reference
In-Depth Information
Let's begin by adding new tables to the SSISIncrementalLoad_Source
database and creating—and populating—a new database named SSISIncrement-
alLoad_Stage . First, add new tables to SSISIncrementalLoad_Source by
executing the T-SQL script shown in Listing 19-16 .
Listing 19-16 . Adding and Populating New SSISincrementalLoad_Source Tables
USE SSISIncrementalLoad_Source
GO
-- Create Source1
If Not Exists(Select name
From sys.tables
Where name = 'Source1')
CREATE TABLE dbo.Source1
(ColID int NOT NULL
,ColA varchar(10) NULL
,ColB datetime NULL
,ColC int NULL
,constraint PK_Source1 primary key clustered (ColID))
Go
-- Load Source1
INSERT INTO dbo.Source1
(ColID,ColA,ColB,ColC)
VALUES
(0, 'A', '1/1/2007 12:01 AM', -1),
(1, 'B', '1/1/2007 12:02 AM', -2),
(2, 'C', '1/1/2007 12:03 AM', -3),
(3, 'D', '1/1/2007 12:04 AM', -4),
(4, 'E', '1/1/2007 12:05 AM', -5),
(5, 'F', '1/1/2007 12:06 AM', -6)
-- Create Source1
If Not Exists(Select name
From sys.tables
Where name = 'Source2')
CREATE TABLE dbo.Source2
 
 
Search WWH ::




Custom Search