SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Current QTD, Previous QTD


Current QTD, Previous QTD

Author
Message
jay83091
jay83091
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
Eugene Elutin
Eugene Elutin
SSCertifiable
SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)

Group: General Forum Members
Points: 6316 Visits: 5478
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 w00t
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!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search