SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Stored Procedure Help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

33 Posts

Posted - 11/06/2013 :  15:07:47  Show Profile  Reply with Quote

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


James K
Flowing Fount of Yak Knowledge

3865 Posts

Posted - 11/06/2013 :  15:32:24  Show Profile  Reply with Quote
Dup of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=189471
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000