How to Save Single Value in a Variable in Execute SQL Task ( Single Row Result Set) -SQL Server Integration Services Tutorial

Scenario:

The company we work has multiple processes running every night. After completing all of the process a Flag it set to YES,No Or Pending in SQL Server Table. We need to create an SSIS Package that read this flag value and then Run Required Tasks according to the flag value that is stored in SQL Server Table.

Items we will leaven in this video

  • How to Create SQL Table with Flag Column
  • How to create Variable in SSIS Package to hold Flag Value 
  • How to save Flag value into Variable by using Execute SQL Task ( Result Set Single Row)
  • How to use Precedence Constraint in SSIS Package to Control the Flow of Tasks Executions
  • Find out If expressions in Precedence Constraint are Case Sensitive or Not in SSIS Package

Script used in the video demo to Extract Single Value from a Table by using Execute SQL Task ( Single Row ResultSet) and handle Flow of Tasks in SSIS Package.

--Create Table to Hold Flag Value
Create table dbo.StatusFlg(Flg VARCHAR(10))
go
insert into dbo.StatusFlg values('YES')

--Check the Flag value 
Select Flg from dbo.StatusFlg

--Update the Flag Value for Testing an SSIS Package
update dbo.StatusFlg
set Flg='Pending'





How to use Single Row ResultSet in Execute SQL Task  in SSIS Package - SSIS Tutorial




 Related Posts / Videos on Execute SQL Task  

No comments:

Post a Comment