Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

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

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

agastyamahi
Starting Member

Canada
33 Posts

Posted - 11/06/2013 :  15:07:47  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3873 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  
 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.02 seconds. Powered By: Snitz Forums 2000