dbTalk Databases Forums  

creating dynamic data-driven file destinations

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss creating dynamic data-driven file destinations in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default creating dynamic data-driven file destinations - 08-08-2006 , 10:15 PM






Here's the scenario:

I've got two tables: school and student:

create table school (
school_id int,
name varchar(25)
)

create table student (
student_id int,
firstname varchar(25),
lastname varchar(25),
etc...
)

I have a stored procedure that returns student data based on a
school_id parameter (student and school are joined to other tables to
create the relation, but that's not important here).

create procedure get_students_by_school
@school_id int

as

select firstname, lastname...from student join ... join school on ...
where school_id = @school_id

....

I want to create a DTS package that executes the stored procedure for
each school_id and stores the results in a different CSV file
destination for each school.

Questions:

1) How do I execute a stored procedured, passing in a parameter from a
data-driven list?
2) How would I put those results into a dynamically created destination
file?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.