Viewing 15 posts - 2,791 through 2,805 (of 4,081 total)
Alvin, I don't OWN a banjo. 😉
I do need to come up with another verse or two, though.
May 20, 2009 at 8:58 am
I just did.
Ahahahahahahahaaaaaaaaaaaaaaa............. 😀
Forgive the cruel cackle of evil amusement.
May 20, 2009 at 8:43 am
Lynn, I usually make it a point to avoid looking at any questions with his name on it. It preserves the serenity of my own personal desert....
May 20, 2009 at 8:37 am
And already answered.....
Lynn, do you realize we're almost at 5k elsewhere?
May 20, 2009 at 8:10 am
But, as I said in the original post, if I run this proc as a job within SQLServer Enterprise Manager (v8), then it always fails with the following message...
Executed as...
May 19, 2009 at 1:22 pm
Very nice little summary, John. Thank you.
May 19, 2009 at 12:53 pm
The imprecision was what troubled me. But it makes sense if you want to keep "ties". I assume that the optimizer has to do a...
May 18, 2009 at 4:29 pm
Mr. Wilbur said RANK()
rank() over (partition by s.objtype order by (s.usecounts) desc) as UCRank
May 18, 2009 at 4:09 pm
Arrrgg! Flo, I just realized I never proofed your article!
I probably shouldn't have thrown the CROSS_APPLY suggestion in. Row_Number() with partitioning is quite quick for...
May 18, 2009 at 2:34 pm
you want your dynamic SQL to dynamically create a the final column as
( [Date1] + [Date2] + ... [DateN] ) AS RowTotal
Now how could we do this? ...
May 15, 2009 at 1:43 pm
TomYum,
If you are going to continue to code in SQL, you need to very quickly read up on JOIN in all it's forms. It's absolutely essential. ...
May 15, 2009 at 1:29 pm
Bruce, how does the RANK approach differ from ROWNUMBER()?
Also, I don't believe that CROSS APPLY will always do a subquery per row. The optimizer may surprise you.
May 15, 2009 at 1:25 pm
Or maybe...
;with distinctObjTypes as
(SELECT DISTINCT objtype FROM sys.dm_exec_cached_plans)
--
SELECT d.objtype,ca.*
FROM distinctObjTypes d
CROSS APPLY
(SELECT top 10 usecounts, cacheobjtype, plan_handle
FROM sys.dm_exec_cached_plans
WHERE ca.objtype = d.objtype
ORDER BY USECOUNTS DESC) ca
--
May 14, 2009 at 10:59 pm
Viewing 15 posts - 2,791 through 2,805 (of 4,081 total)