eo
MIS
- Apr 3, 2003
- 809
Newbie to SSIS (2005), have a basic package, how to validate if a source table exists before I drop and recreate the table, and then load the data to it??
The first part of the Control Flow is a "Execute T-SQLstatement"
It then goes to a Data Flow task, Source Query > Destination table (created in the initial control flow task)
I ideally want to validate if the source is available and that it contains data before the initial control flow task.
What is the most sound way to do this?
Thanks,
EO
Hertfordshire, England
The first part of the Control Flow is a "Execute T-SQLstatement"
Code:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExchangeRate]'))
DROP TABLE [dbo].[ExchangeRate]
GO
CREATE TABLE [ARD].[dbo].[ExchangeRate] (
[InsertedDate] datetime NOT NULL,
[RowPosition] char(1) NOT NULL,
[SourceCurrencyCode] varchar(50) NOT NULL,
[TargetCurrencyCode] varchar(50) NOT NULL,
[DateOfExchange] datetime NOT NULL,
[RatePeriod] int,
[RateType] varchar(50),
[Rate] decimal(15,8)
)
GO
It then goes to a Data Flow task, Source Query > Destination table (created in the initial control flow task)
I ideally want to validate if the source is available and that it contains data before the initial control flow task.
What is the most sound way to do this?
Thanks,
EO
Hertfordshire, England