Quantcast
Channel: Questions in topic: "ssis"
Viewing all articles
Browse latest Browse all 813

stored procedure to execute and output to excel

$
0
0
I am working on a project and got stuck on looking for the best solution... I have a stored procedure with 3 parameters. The stored procedure returns the Campus Location, UserName, and Date that they were created. The parameters are @campus, @date, and @id. The @date stands for the date to run the SP. The @id stands for if its 1 then run the SP for full month or if its 0 then run it for previous day. **My Goal is to create a SSIS package and execute the Stored procedure have it run for 10 Campuses and output the results to a csv file. Each campus would be each own cvs file so 10 in total. How do I go about this??? I am stuck , any help would be appreciated...** I have a table with all the campus names. How can I run the SP for all the Campuses based on the @Campus parameter? the SP looks like this.... EXEC dbo.StoreProcName` 7, '4/11/2013',1 @Campus int, @date smalldatetime, @id int as set nocount on; If @id < 1 select campus ,displayname, datecreated from Tablename where datecreated >@date and datecreated < @date +1 and Table.dbo.Campus = @campus If @id >=1 select campus ,displayname, datecreated from Tablename where datecreated >@date and datecreated < @date +1 and Table.dbo.Campus = @campus

Viewing all articles
Browse latest Browse all 813

Trending Articles