June 24, 2014 at 10:56 am
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
June 24, 2014 at 11:00 am
Ed Wagner (6/24/2014)
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
And I really appreciate the referrals (now if I could just get back to writing on my blog!) but this question was really just how do I add 10 years to today. I posted the appropriate dateadd function but that was it.
June 24, 2014 at 11:01 am
Lynn Pettis (6/24/2014)
Ed Wagner (6/24/2014)
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
And I really appreciate the referrals (now if I could just get back to writing on my blog!) but this question was really just how do I add 10 years to today. I posted the appropriate dateadd function but that was it.
Insult to injury, the OP has been a member of ssc for 6 years.
June 24, 2014 at 11:03 am
Just tell them to add 10 to today 365 times.:-D
June 24, 2014 at 11:06 am
djj (6/24/2014)
Just tell them to add 10 to today 365 times.:-D
Don't you mean 365.25 times? Or would that be add 365.25 to today 10 times? It all depends on the year of today...no wait...that means a date function is required. Never mind. 😀
June 24, 2014 at 11:17 am
Lynn Pettis (6/24/2014)
Lynn Pettis (6/24/2014)
Ed Wagner (6/24/2014)
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
And I really appreciate the referrals (now if I could just get back to writing on my blog!) but this question was really just how do I add 10 years to today. I posted the appropriate dateadd function but that was it.
Insult to injury, the OP has been a member of ssc for 6 years.
Sorry, Lynn. I just had to weigh in on that thread. I like how a the OP marked a post with a followup question as the answer. 😛
June 24, 2014 at 11:24 am
Lynn Pettis (6/24/2014)
Lynn Pettis (6/24/2014)
Ed Wagner (6/24/2014)
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
And I really appreciate the referrals (now if I could just get back to writing on my blog!) but this question was really just how do I add 10 years to today. I posted the appropriate dateadd function but that was it.
Insult to injury, the OP has been a member of ssc for 6 years.
The correct syntax is: getdate() + 10 years. Duh!
If you need it to run really fast, it is getdate() + 10 years, please.
--------------------------------------
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 24, 2014 at 11:26 am
Stefan Krzywicki (6/24/2014)
Lynn Pettis (6/24/2014)
Lynn Pettis (6/24/2014)
Ed Wagner (6/24/2014)
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Refer them to your common date routines. I refer others to it.
And I really appreciate the referrals (now if I could just get back to writing on my blog!) but this question was really just how do I add 10 years to today. I posted the appropriate dateadd function but that was it.
Insult to injury, the OP has been a member of ssc for 6 years.
The correct syntax is: getdate() + 10 years. Duh!
If you need it to run really fast, it is getdate() + 10 years, please.
That's what my problem was! Here I was using getdate() + 10 years NOW
Edit: I forgot: getdate() + 10 years NOW WITH (NOLOCK)
June 24, 2014 at 11:46 am
Lynn Pettis (6/24/2014)
< rant >Help me, help me. I don't know how to use BOL or Google! I need to add 10 years to the current date and getdate() + 10 doesn't work.
< /rant >
Why doesn't it work? :alien:
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 24, 2014 at 1:06 pm
Luis Cazares (6/24/2014)
Congratulations Koen. You're certainly one of the top posters on Bi.On a completely different subject, I'm taking 20467BC course this week and found some surprises like using while loops to create sample data, recommendations to use partitioning for performance and nolock hints on every view in the data warehouse to prevent concurrency issues. :w00t:
Are they serious? Should I unlearn something?
Partitions do improve insert performance. Might help for very large fact tables.
And you also have the partition eliminiation when querying, but I haven't noticed that much performance improvement.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 24, 2014 at 1:24 pm
Koen Verbeeck (6/24/2014)
Luis Cazares (6/24/2014)
Congratulations Koen. You're certainly one of the top posters on Bi.On a completely different subject, I'm taking 20467BC course this week and found some surprises like using while loops to create sample data, recommendations to use partitioning for performance and nolock hints on every view in the data warehouse to prevent concurrency issues. :w00t:
Are they serious? Should I unlearn something?
Partitions do improve insert performance. Might help for very large fact tables.
And you also have the partition eliminiation when querying, but I haven't noticed that much performance improvement.
Partitions can improve some performance in limited scenarios. It isn't something I'd suggest for every database.
I don't think I agree with any of the suggestions the course is giving. Tally tables for sample data or cross joins on sys tables and I'd stay away from NOLOCK whenever possible if only to discourage its use among people who don't understand the risks.
--------------------------------------
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 24, 2014 at 4:14 pm
Luis Cazares (6/24/2014)
On a completely different subject, I'm taking 20467BC course this week and found some surprises like using while loops to create sample data, recommendations to use partitioning for performance and nolock hints on every view in the data warehouse to prevent concurrency issues. :w00t:Are they serious? Should I unlearn something?
If the data warehouse is being queried while it's static - ie not while data is being added to the tables being queried - it's appropriate to use SET TRANSACTION ISOLATION LEVEL READ UNCOMITTED. Only if there are some tables which are effectively static and others that are not is it appropriate to use nolock hints. Of course if the error caused by dirty reads on some tables is harmless you can count those tables as static even if they aren't.
Tom
June 24, 2014 at 5:31 pm
WHOOP!
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
June 25, 2014 at 5:00 am
Just saw a post (on another site) that the person had part of a query list but no quest was asked. Someone posted "What is your question?" and the post back "It's in my original post." It was not.
June 25, 2014 at 5:12 am
TomThomson (6/24/2014)
Luis Cazares (6/24/2014)
On a completely different subject, I'm taking 20467BC course this week and found some surprises like using while loops to create sample data, recommendations to use partitioning for performance and nolock hints on every view in the data warehouse to prevent concurrency issues. :w00t:Are they serious? Should I unlearn something?
If the data warehouse is being queried while it's static - ie not while data is being added to the tables being queried - it's appropriate to use SET TRANSACTION ISOLATION LEVEL READ UNCOMITTED. Only if there are some tables which are effectively static and others that are not is it appropriate to use nolock hints. Of course if the error caused by dirty reads on some tables is harmless you can count those tables as static even if they aren't.
And when the cube processing fails, where are you going to find the (harmless) error?
😎
Viewing 15 posts - 44,371 through 44,385 (of 66,749 total)
You must be logged in to reply to this topic. Login to reply