June 18, 2010 at 11:57 am
Steve you haven't heard to fix the budget the Gov is going to allow moths to be sponsored. next month will not be july it will be City Bank month.
Sorry my sarcasm is working overtime today and I could not help myself.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 18, 2010 at 12:07 pm
Dan.Humphries (6/18/2010)
Steve you haven't heard to fix the budget the Gov is going to allow moths to be sponsored. next month will not be july it will be City Bank month.Sorry my sarcasm is working overtime today and I could not help myself.
Now there's a table dying to be built! I know oyu were being sarcastic, but it reminded me that
July Is:
UV Safety Month
National Park Month
National Baked Beans Month
National Ice Cream Month
National Tennis Month
Read An Almanac Month
Anti-Boredom Month
Hitchhiking Month
Bereaved Parents Month
Bioterrorism/Disaster Education and Awareness Month
Blueberries Month
Cell Phone Courtesy Month
Family Reunion Month
Hemochromatosis Screening Awareness Month
Herbal/Prescription Awareness Month
International Blondie and Deborah Harry Month
International Group B Strep Awareness Month
Lasagna Awareness Month
National Child-Centered Divorce Month
National Culinary Arts Month
National Doghouse Repairs Month
National Grilling Month
National Horseradish Month
National Hot Dog Month
National Make a Difference to Children Month
National Pickle Month
National Picnic Month
National Share A Sunset With Your Lover Month
National Wheelchair Beautification Month
Sandwich Generation Month
Smart Irrigation Month
Social Wellness Month
Tour de France Month
Women's Motorcycle Month
Fireworks Safety Month
And that's just the start! There's more out there.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itโs unpleasantly like being drunk.
Whatโs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
June 18, 2010 at 12:11 pm
That list is cracking me up. Anti-Boredom Month roflmao!! ๐
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 18, 2010 at 12:13 pm
I think my favorite is International Blondie and Deborah Harry Month
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itโs unpleasantly like being drunk.
Whatโs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
June 18, 2010 at 12:14 pm
July is Lasagna Awareness Month ?? OMG!!! I've been celebrating it all wrong.
๐
June 18, 2010 at 1:03 pm
If we are truly going to implement those months, some of which I really like, I guess we'd want a table. After all, who knows when we will have Celebrate-Texting-Month and Drink-A-Diet-Soda month as well. Wouldn't want to update too many reports for those :w00t:
June 18, 2010 at 1:49 pm
Steve Jones - Editor (6/18/2010)
For one to 12? Rounds trip to the server? Wouldn't it be easier to hard code these in? AFAIK, months don't change often.
Wouldn't the table option be actually a good option?
Especially since it could easily accomodate Fiscal periods, callendar periods, week of year, month of year, quarters.
Not that I don't mind seeing some great code once in awhile, but sometime simpler is better.
Nothing simpler than you have a floating holiday that changes every year, and just have to flip a 1 to a 0, and your number of days in a week could be fixed everywhere you use it in a calculation.
Greg E
June 18, 2010 at 1:57 pm
just to throw my two since in I think that if you are doing a full blown table with dates then this is a better option this is particularly useful if you plan to use it as a tally table. See Jeff moden's article Here[/url]
However if you are just pulling 12 records to use as a parameter in a report and nothing else then this is a fair bit of overkill unless you have to right hundreds of reports using this parameter. in that case it might be worth writing a SP to pull the params in.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 18, 2010 at 2:11 pm
Dan.Humphries (6/18/2010)
just to throw my two since in I think that if you are doing a full blown table with dates then this is a better option this is particularly useful if you plan to use it as a tally table. See Jeff moden's article Here[/url]However if you are just pulling 12 records to use as a parameter in a report and nothing else then this is a fair bit of overkill unless you have to right hundreds of reports using this parameter. in that case it might be worth writing a SP to pull the params in.
Heh... owch! I got a little whiplash here. ๐
I have to ask, Dan... knowing that there are probably a half dozen easy to use set based solutions for this, why did you first solve the problem on this thread with a While Loop?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2010 at 2:26 pm
Bad habits die hard and it was before I read your article from another post.
that and it was 12 records so I must admit I gave it little thought.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 18, 2010 at 2:34 pm
Actually before I read your article I must admit I gave very little thought to set based programming at all.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
June 18, 2010 at 3:01 pm
Dan.Humphries (6/18/2010)
Actually before I read your article I must admit I gave very little thought to set based programming at all.
Now, this here is a man that isn't afraid to speak the truth. And, apparently, willing to face up to his mistakes! ๐
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 18, 2010 at 5:01 pm
WayneS (6/18/2010)
Dan.Humphries (6/18/2010)
Actually before I read your article I must admit I gave very little thought to set based programming at all.Now, this here is a man that isn't afraid to speak the truth. And, apparently, willing to face up to his mistakes! ๐
Agreed. Thanks for the feedback, Dan.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 18, 2010 at 5:23 pm
Greg Edwards-268690 (6/18/2010)
Steve Jones - Editor (6/18/2010)
For one to 12? Rounds trip to the server? Wouldn't it be easier to hard code these in? AFAIK, months don't change often.Wouldn't the table option be actually a good option?
Especially since it could easily accomodate Fiscal periods, callendar periods, week of year, month of year, quarters.
Not that I don't mind seeing some great code once in awhile, but sometime simpler is better.
Nothing simpler than you have a floating holiday that changes every year, and just have to flip a 1 to a 0, and your number of days in a week could be fixed everywhere you use it in a calculation.
Greg E
Completely agree if that's a possibility. If it's only a 1-12 calculation, why hit the database ever?
June 18, 2010 at 8:48 pm
Steve Jones - Editor (6/18/2010)
Greg Edwards-268690 (6/18/2010)
Steve Jones - Editor (6/18/2010)
For one to 12? Rounds trip to the server? Wouldn't it be easier to hard code these in? AFAIK, months don't change often.Wouldn't the table option be actually a good option?
Especially since it could easily accomodate Fiscal periods, callendar periods, week of year, month of year, quarters.
Not that I don't mind seeing some great code once in awhile, but sometime simpler is better.
Nothing simpler than you have a floating holiday that changes every year, and just have to flip a 1 to a 0, and your number of days in a week could be fixed everywhere you use it in a calculation.
Greg E
Completely agree if that's a possibility. If it's only a 1-12 calculation, why hit the database ever?
We have 100's of reports (SQL RS), and this table also feeds our time dimension in the cube.
And probably 10 to 20 times that many SSAS views, so it would be painful if we didn't centralize time.
I seem to recall the OP mentioned year also at one point, which to me, would make it more than just a simple 1 to 12.
Things tend to grow, and it's better to think about that before you have to do a ton on burger flipping.
I agree with avoiding the round trips, but if you start doing this in numerous reports, and requirements change, round trips to a table or sp might not look so bad.
So I guess it depends....
Greg E
Viewing 15 posts - 16 through 29 (of 29 total)
You must be logged in to reply to this topic. Login to reply