Viewing 15 posts - 4,036 through 4,050 (of 10,144 total)
Or CROSS APPLY VALUES:
-- sample data
;WITH gennum (tollnum, n1, n2, n3) AS (
SELECT 800123, 1234, 1235, 1236 UNION ALL
SELECT 999123, 9876, 9875, 9874
)
-- solution
SELECT g.tollnum, d.code
FROM gennum g
CROSS APPLY...
September 4, 2013 at 7:46 am
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...
September 4, 2013 at 7:07 am
Hugo Kornelis (9/3/2013)
- In the second...
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...
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()...
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 -...
September 3, 2013 at 9:00 am
GilaMonster (9/3/2013)
Having fun preaching there Chris? :hehe:
Oi don't you start! :hehe:
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...
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...
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...
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...
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)
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...
September 3, 2013 at 4:11 am
Junglee_George (9/3/2013)
PhaseType, TQSDComment, TQPIComment, thus avoiding the left join using the...
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...
September 3, 2013 at 1:15 am
Viewing 15 posts - 4,036 through 4,050 (of 10,144 total)