Viewing 15 posts - 4,036 through 4,050 (of 10,143 total)
Your date arithmetic has two flaws which could cause your query to return incorrect results.
1.They overlap. The day6 upper bound is C.SCHED_DTTM <= GETDATE()+6 and the day7 lower bound is...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 4, 2013 at 7:07 am
Hugo Kornelis (9/3/2013)
- In the second...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 4, 2013 at 3:41 am
Toreador (9/4/2013)
ChrisM@Work (9/4/2013)
They don't yield the same result set using 2k8. The first query generates a different result set each time it's run.
I get the same result set every...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 4, 2013 at 2:03 am
Rune Bivrin (9/3/2013)
Or even try this, where NEWID() is completely eliminated from the second query.
-- 1
SELECT ROW_NUMBER()...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 4, 2013 at 1:32 am
The first plan is less than optimal; Grant Fritchey writes about "Reason for Early Termination" here[/url].
You've got a potentially redundant table in your FROM list - dbo.company_name -...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 9:00 am
GilaMonster (9/3/2013)
Having fun preaching there Chris? :hehe:
Oi don't you start! :hehe:
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 6:39 am
What do you think this update statement should do?
UPDATE @Results SET
TQSDComment = SDAAFV.txtValue --AS TQSDComment
FROM ActivitiesAdditionalFieldsValues AS SDAAFV
LEFT JOIN ActivitiesAdditionalFields AS SDAAF
ON...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 6:28 am
T.Ashish (8/27/2013)
Thanks again for your help.
I could not see any performance difference with/without function. I have pasted the function for you. Meanwhile I'm looking into third point you suggested.
CREATE...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 6:23 am
L' Eomot Inversé (9/3/2013)
Koen Verbeeck (9/3/2013)
ChrisM@Work (9/3/2013)
Jan Van der Eecken (9/3/2013)
SQLRNNR (9/2/2013)
Koen Verbeeck (9/1/2013)
GilaMonster (8/31/2013)
Microsoft will no longer offer Masters and Architect level training rotations and will be retiring...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 6:20 am
Jeff Moden (9/2/2013)
ramya.usapp (9/1/2013)
Please help me in writing a query!!
Question:
Write a query based off of the following data stored in the AccountingEntry table. The query needs to return...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 4:56 am
Junglee_George (9/3/2013)
Lend me a helping hand rather than preaching.....
ChrisM@Work (9/3/2013)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 4:46 am
This isn't a specific problem, it's ordinary day to day TSQL development work. Start with your original query. Remove tables which don't contribute to your result set - including row...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 4:11 am
Junglee_George (9/3/2013)
PhaseType, TQSDComment, TQPIComment, thus avoiding the left join using the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 3:33 am
Jan Van der Eecken (9/3/2013)
SQLRNNR (9/2/2013)
Koen Verbeeck (9/1/2013)
GilaMonster (8/31/2013)
Microsoft will no longer offer Masters and Architect level training rotations and will be retiring the Masters level certification exams as...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 1:15 am
Junglee_George (9/3/2013)
How can I modify the query such that LEFT JOIN on activities, typeofactivities can be removed, so that query performance is good? This is my query:...
What do you want...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 3, 2013 at 1:06 am
Viewing 15 posts - 4,036 through 4,050 (of 10,143 total)