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
 Transact-SQL (2005)
 Stored Procedure Help

Author  Topic 

agastyamahi
Starting Member

33 Posts

Posted - 2013-11-06 : 15:07:47
Hello,

I have the command below:

Execute sp_RevenueSummary_SEL @ai_Year = 2013, @ai_Month = 10, @ai_CurrencyID = 1, @ac_UserName = ptjohn, @ac_IsController = N
Execute sp_RevenueSummary_SEL @ai_Year = 2013, @ai_Month = 10, @ai_CurrencyID = 1, @ac_UserName = ptjohn, @ac_IsController = Y

I need to get the open month and year and run these commands for that month + 12 months going forward.

Once I get this, I can create a automated job that runs every hour. Could you please let me know how I can get the month incremented automatically, should I write an if condition for each month and year. Please let me know

Thanks

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-11-06 : 15:32:24
Dup of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=189471
Go to Top of Page
   

- Advertisement -