Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Current QTD, Previous QTD
Current QTD, Previous QTD
Rate Topic
Display Mode
Topic Options
Author
Message
jay83091
jay83091
Posted Thursday, July 01, 2010 12:11 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, June 06, 2011 5:02 PM
Points: 4,
Visits: 19
Hi Experts,
I have a detailed date dim table trying to figure out a way to create a column that indicates 'Calendar Type' (i.e. determines whether the period [e.g. 200912, 201001 etc] is the current QTD or previous QTD)
e.g. for the current month of July 2010
20104 - previous QTD
20105 - previous QTD
20106 - previous QTD
20107 - current QTD
20108 - current QTD
20109 - current QTD
thanks for your help in advance
I have these in the view already.
Current MAT 201001
Current YTD 201001
Month 201001
Current MAT 201002
Current YTD 201002
Month 201002
Previous Month 201002
Current MAT 201003
Current Month 201003
Current YTD 201003
Month 201003
Month 201004
Month 201005
Month 201006
Month 201007
Month 201008
Month 201009
Month 201010
Month 201011
Month 201012
Post #945940
Eugene Elutin
Eugene Elutin
Posted Thursday, July 01, 2010 4:02 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 10:59 AM
Points: 2,525,
Visits: 4,324
jay83091 (7/1/2010)
...
e.g. for the current month of July 2010
20104 - previous QTD
20105 - previous QTD
20106 - previous QTD
20107 - current QTD
20108 - current QTD
20109 - current QTD
thanks for your help in advance
I have these in the view already.
Current MAT 201001
Current YTD 201001
Month 201001
Current MAT 201002
Current YTD 201002
Month 201002
Previous Month 201002
Current MAT 201003
Current Month 201003
Current YTD 201003
Month 201003
Month 201004
Month 201005
Month 201006
Month 201007
Month 201008
Month 201009
Month 201010
Month 201011
Month 201012
Sorry, but it is very unclear what you really want
In a sample you gave how would you mark 201003? Pre-previous?
what about 201010? Future QTD?
Then looking into your view, I can see that the same month (201002) is taken as Current MAT, Current YTD, Month and as Previous Month
What do you really want. Please click the link in my signature to present your question in a bit more helpfull way.
_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help
Post #946034
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.