Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Wednesday, March 7, 2012

Can Code be used to define parameters in a subscription?

I am trying to create an email subscription that runs every Monday for the previous week. To do this I was trying to set the start date parameter to dateadd("d", -7, today()) and the end date parameter to dateadd("d", -1, today()). However, every time I change it to anything but a static date value, the screen refreshes and changes the code back to the default date.

I know I can set the defaults to the previous week in the report itself but I already have another subscription that runs the same report as MTD so the parameter defaults are set to that. The only other way I can think to accomplish this is to create a copy of the report with the only difference being parameter defaults (which I don't think is a good solution).

Any suggestions are welcome.

You said that you have the other report run for MTD. What do you mean by that?|||Sorry, Month To Date (MTD)|||Does anyone know if this is possible? I still have not found a solution.

Friday, February 10, 2012

Calling stored procs based on a code table

I need to run stored procs based on a list in a code table. In other words, it reads the name of a stored proc from a table and runs it and does this for all the rows in the table.I think the ForEach loop container will do what I need and there is an ADO enumerator option but the documentation does not tell you how to use this.From what I can tell, you need to get a dataset into an SSIS variable first and then you plug the variable name into the ForEach ADO enumerator.Is that correct? If so, can someone tell me how to get a dataset into a variable?

Thanks

Perhaps kirk's blog will help you:

http://sqljunkies.com/WebLog/knight_reign/archive/2005/03/25/9588.aspx