Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Execute sql task

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-07-18 : 02:34:08
i have 2 query

select a,b from tableA WHERE c Between 1 and 3
select a,b from tableA WHERE c Between 4 and 6

how can i pass it to two result set in execute sql task componrnt (do i need create 2 execute sql task components?)







slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-07-18 : 04:51:49
this will help you
http://www.sqlis.com/post/The-Execute-SQL-Task.aspx
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-07-18 : 05:44:49
i know this article,
it doesn't have example of two variable name in same result set in same execute sql task component
Go to Top of Page

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-07-18 : 06:28:53
just pass the values to two different variables where you will later use this two variables in dataflow for transformation purposes.
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-07-19 : 02:40:57
can i do it in same execute sql task componrnt?

(i create 2 variables of object type.)
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-19 : 02:54:20
I think it would be a clean solution to have two sql task steps.
Keep it simple


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2010-07-19 : 07:37:03
ok,

i have one variable (type object)

select id,name from tableA

id,name
1 a
2 b
3 d


i have 3 Foreach Loop Container, i want the first container run on id=1 and second contatiner run on id-2 and contatiner 3 on id=3.

so i need to create 3 variable of type object or is it way to run part of variable data?
Go to Top of Page
   

- Advertisement -