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

 All Forums
 General SQL Server Forums
 Script Library
 Need help regarding a query while executing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kishoremcp
Starting Member

India
39 Posts

Posted - 12/17/2013 :  12:06:44  Show Profile  Reply with Quote
Hi,

I have a database which will update automatically on 2nd evening of every month. I have a query which is giving an output. But If i run the same query on 1st of a month then it is not giving any output.

It should not happen like that. The query should not execute and also it should show previous values only if the query is running on 1st of any month.

Any help please...

Regards
Kishore

tkizer
Almighty SQL Goddess

USA
35954 Posts

Posted - 12/17/2013 :  12:25:34  Show Profile  Visit tkizer's Homepage  Reply with Quote
You haven't provided enough information for us to help. We need to see the query and some data (what it is doing and what you expect).

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 12/18/2013 :  06:51:50  Show Profile  Reply with Quote
quote:
Originally posted by kishoremcp

Hi,

I have a database which will update automatically on 2nd evening of every month. I have a query which is giving an output. But If i run the same query on 1st of a month then it is not giving any output.

It should not happen like that. The query should not execute and also it should show previous values only if the query is running on 1st of any month.

Any help please...

Regards
Kishore


where are you executing it from? is it automated in a sql server agent job? See the logic used for date part. Thats were you need to apply the 2nd day of month logic
post your currently used query if you need more assistance.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
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.06 seconds. Powered By: Snitz Forums 2000