Solved

ssis execute sql task how to ?

Posted on 2011-03-02
3
466 Views
Last Modified: 2012-05-11
In my dtsx packages. I have bulk insert task and execute sql task how do I link between this two ? and what option I have in execute sql task to save the query results to txt file and how to configure it ?
0
Comment
Question by:motioneye
3 Comments
 
LVL 7

Assisted Solution

by:lozzamoore
lozzamoore earned 50 total points
ID: 35016181
You need to explain in a bit more detail what you mean by "link the two".

Generally tasks are "linked" to a "Connection". Once a connection is created, then the corresponding Connection property can be set in each of the Tasks.

As for results to txt file, if you are running a SQL query that produces results, then you would typically run this within a Data Flow task, and not a SQL Task.

Hope this helps,

L
0
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 450 total points
ID: 35016189
Hi MotionEye,
To get query results to text file, the best approach is to drag an OLEDB Source object  and a Flat File  Destination object into the Control Flow section  in Designer.
Edit the OLEDB source to execute an SQL Command and enter the SQL statement that gets the required result set.
Edit the flat file destination and enter the path of the required text file
I have attached a print screen as an aid
SSIS.jpg
0
 

Author Closing Comment

by:motioneye
ID: 35016479
Thanks for the quick help :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now