• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

SSIS question

I want to design a SSIS package with following requirements:
Below are the 3 queries

1      SELECT * FROM EMP WHERE EMPNAME='TEST'
2      SELECT * FROM EMP WHERE ENO=200
3      SELECT * FROM EMP WHERE EADDRESS='ATLANTA'

The trick is I need to  run query 2  which should not include the output from  query 1
and query 3 shouldnt return the rows shown in Query 2.
How is it possible  in SSIS?

0
venk_r
Asked:
venk_r
  • 4
  • 2
1 Solution
 
vdr1620Commented:
Well, its the same trick that you will use to get the results in management studio... If i understood your Q correctly, i think below query might work.. use that in the OLE DB Source Component inside a Data Flow Task

SELECT * FROM EMP WHERE EMPNAME='TEST'
UNION
SELECT * FROM EMP WHERE ENO=200 and EMPNAME !='TEST'
UNION
SELECT * FROM EMP WHERE EADDRESS='ATLANTA' AND ENO != 200 and EMPNAME != 'TEST'
0
 
venk_rAuthor Commented:
Wel thats just an example.In the real scenario we have multiple conditions doing this and more then 10 statements. Is there a way in SSIS to check ignore the data from the previous steps instead of writing multiple lines of conditions.
0
 
venk_rAuthor Commented:
Basically I will be generating txt files based on each condition at each step.
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
vdr1620Commented:
I think it can be better achieved by using sql statements rather than using SSIS ... and you will need to do the same in SSIS also..that is compare the outputs using Look up transformation


Example : http://www.mssqltips.com/sqlservertip/1511/lookup-and-cache-transforms-in-sql-server-integration-services/
0
 
venk_rAuthor Commented:
I used different data flow tasks with multicast transformation in SSIS  to address the issue. Thanks ALL
0
 
venk_rAuthor Commented:
I used different data flow tasks with multicast transformation in SSIS  to address the issue. Thanks ALL
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now