Viewing 15 posts - 1,906 through 1,920 (of 8,416 total)
Jeff Moden (7/2/2011)
July 2, 2011 at 11:51 pm
Jeff Moden (7/1/2011)
I didn't post the code but, if you look under the code window I posted, there's a link. π
I was expecting the code you posted to use...
July 1, 2011 at 9:26 am
CELKO (6/30/2011)
SELECT DISTINCT report_unit_name, business_unit_name,MAX(something_consolidation)
OVER (PARTITION BY report_unit_name, business_unit_name)
FROM Foobar;
That's semantically...
July 1, 2011 at 12:02 am
ChrisM@Work (6/30/2011)
...code...
Hi Chris,
You might be interested in a slight tweak to that code. Take a look at the query plans for these:
-- Special distinct sort
SELECT
x.RU,
x.BU,
x.ENT
FROM
(
SELECT
*,
rn = ROW_NUMBER() OVER (
PARTITION...
June 30, 2011 at 11:56 pm
Jeff Moden (6/29/2011)
... it's not even spelled correctly.
June 30, 2011 at 11:41 pm
I doubt you will receive many useful replies to your question unless you can provide something more concrete for people to work with.
June 30, 2011 at 11:38 pm
David Kranes (6/30/2011)
June 30, 2011 at 11:36 pm
Jeff Moden (6/30/2011)
One more "extension" of the problem you posed.
Did you forget to post the splitting code?
June 30, 2011 at 11:28 pm
No worries. Thanks for posting an interesting question.
June 30, 2011 at 11:25 pm
CELKO (6/30/2011)
First, shoot the idiot that used VARCHAR(MAX) for the string.
Or, better still, educate them. VARCHAR(MAX) is not worth going to jail for. π
Seriously, yes VARCHAR(MX) is generally a...
June 30, 2011 at 10:52 pm
tfifield (6/30/2011)
That one is bloody brilliant! It would never have occurred to me to use an OUTPUT clause from an UPDATE for an INSERT.
:blush: Thank you.
Remind me to buy...
June 30, 2011 at 2:13 pm
CELKO (6/30/2011)
June 30, 2011 at 12:41 pm
Yes different plans have to be cached for different SET options (see is_cache_key in sys.dm_exec_plan_attributes) because they can produce different results, as you've seen π
June 30, 2011 at 10:45 am
dean.g (6/30/2011)
June 30, 2011 at 10:29 am
Hi,
I just use the apply to avoid having to duplicate the expression in the GROUP BY. It's one of the examples from my SSC article on APPLY. There's...
June 30, 2011 at 8:58 am
Viewing 15 posts - 1,906 through 1,920 (of 8,416 total)