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
 Week numbers based on physical year
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kishoremcp
Starting Member

India
39 Posts

Posted - 10/25/2013 :  07:18:43  Show Profile  Reply with Quote
Hi,

my physical year starts in June. So, June 1st week is week 1 for me. Like that if i give a date then it should give me the week number according to my phisical year. how to get it in sql query?

Regards
Kishore

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 10/25/2013 :  08:39:57  Show Profile  Reply with Quote
You mean Fiscal year rite?
Best thing is to populate calendar table with all your dates and then apply week value sequentially as 1,2 etc from June 1 onwards with corresponding fiscal year value

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

kishoremcp
Starting Member

India
39 Posts

Posted - 10/25/2013 :  09:00:08  Show Profile  Reply with Quote
Yes.

Regards
Kishore
Go to Top of Page

kishoremcp
Starting Member

India
39 Posts

Posted - 10/25/2013 :  09:56:24  Show Profile  Reply with Quote
Is it not possible using a query dynamically?

Regards
Kishore
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 10/25/2013 :  10:40:05  Show Profile  Reply with Quote
quote:
Originally posted by kishoremcp

Is it not possible using a query dynamically?

Regards
Kishore


does it always coincide with actual month start and end?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

kishoremcp
Starting Member

India
39 Posts

Posted - 10/25/2013 :  10:48:14  Show Profile  Reply with Quote
Yes. You are correct..

Regards
Kishore
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.09 seconds. Powered By: Snitz Forums 2000