shamim
shamim

Reputation: 6768

how to combine two different record sets In SSIS

Have two table

Table Model

Id      int Unchecked
MakeId  int Unchecked
Name    nvarchar(255)   

Table Feature

 FId    int Checked

Both table have no relation . Want a record set having both table column.

Table Destination

Id      int Unchecked
MakeId  int Unchecked
Name    nvarchar(255)   
FId int Checked

can not use bellow sql because i have two datasouce,one for Model and another one for Feature(this one select just top 1 record)

select Id,MakeId,Name,(select top 1 Fid from Feature) as Fid from Model

Upvotes: 1

Views: 189

Answers (1)

digital.aaron
digital.aaron

Reputation: 5707

What I'd do, since you only want a single TOP 1 result from Feature, is save that value to a variable in the Control Flow with an Execute SQL task. Then in the Data Flow, configure your source data connection, and run that to a Derived Column task. Then define a new column that uses the Feature variable you created. Then you can run the output of the Derived Column to your destination (or other task, etc).

Upvotes: 1

Related Questions