Solved

SSIS - SQL script

Posted on 2014-02-18
3
226 Views
Last Modified: 2016-02-10
Hi

 Can I run a SQL involving multiple tables in SSIS? So far I can seem to pull data from a single table using Data flow?
0
Comment
Question by:LuckyLucks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 39869515
Hi,

Maybe this is too obvious, but create a view, and use that as a data source.

Regards
  David
0
 
LVL 37

Assisted Solution

by:ValentinoV
ValentinoV earned 500 total points
ID: 39869761
It's supported, even without a view.  If you open the properties of the OLE DB Source, you'll see a dropdown called Data access mode.  The default is Table or view but this is not a recommended practice (it's the equivalent of SELECT *).  Change it to SQL command and you'll be able to enter any SELECT statement there, including one with joins to other tables.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 39869764
BTW: whenever I need a complex query as source I usually put it in a stored procedure.  The reason for this is because these types of query are prone to changes and when you're dealing with a production environment on which you don't have any write access, you want to minimize the change impact.  In this case you wouldn't need to modify the SSIS package when the source query logic changes, as long as the output fields remain the same of course.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My client sends data in an Excel file to me to load them into Staging database. The file contains many sheets that they have same structure. In this article, I would like to share the simple way to load data of multiple sheets by using SSIS.
My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
Viewers will learn the different options available in the Backstage view in Excel 2013.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question