From: Justin Blanding on


"Plamen Ratchev" wrote:

> This is easy to do, just useless exercise... Here is the solution, just add the extra formating for fun (run with
> Results to Text to see the correct output):
>

@Plamen
<ego check>
If it is "useless exercise" and is "easy" then why doesn't your script work?
Try using the date "12/2005" or 1/2006 and 2/2006 next to each other
Also, your first version had questionable performance numbers (and also
didn't work).
Your pivot is very intriguing. I am noticing the same performance (logical
reads and scans) no matter how many dates I add. Fix the bad date, and also
make consecutive months work (they show on the same line) and you could have
quite a performer as the number of dates goes higher. My version has to do 2
scans, but has far less reads than the pivot.
</ego check>
I am sure you didn't test it thoroughly or anything so don't take me too
seriously, but I thought I would just let you know in case you ever used your
code for some other reason.

From: Plamen Ratchev on
Justin,

As I already indicate this was just to demonstrate the this is doable in T-SQL. I can post correct version with more eye
pleasing output but there is really no point to spoil Brad's effort to run a contest.

--
Plamen Ratchev
http://www.SQLStudio.com
From: Brad Schulz on
Jeff and Justin...

I have no doubt at all that Plamen could solve the challenge perfectly, with
his eyes blindfolded and his hands tied behind his back. He has better T-SQL
skills than anybody I know.

Thank you to Plamen, though, for not taking the bait and posting more code
in response. I appreciate that.

Good luck to the 3 J's in the challenge (Jay, Jeff, Justin).

--Brad


From: TheSQLGuru on
Plamen does indeed know how to craft a fine query!!

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Brad Schulz" <BradSchulz(a)discussions.microsoft.com> wrote in message
news:548AB3BA-28AD-4263-9D3D-587B95711271(a)microsoft.com...
> Jeff and Justin...
>
> I have no doubt at all that Plamen could solve the challenge perfectly,
> with
> his eyes blindfolded and his hands tied behind his back. He has better
> T-SQL
> skills than anybody I know.
>
> Thank you to Plamen, though, for not taking the bait and posting more code
> in response. I appreciate that.
>
> Good luck to the 3 J's in the challenge (Jay, Jeff, Justin).
>
> --Brad
>
>


From: Justin Blanding on
Agreed, just thought his first post made it seem like it was easy as cake and
should be spit out in about 10 seconds. Thought the challenge deserved more
respect than that... He should compete, and hammer the competition.

"TheSQLGuru" wrote:

> Plamen does indeed know how to craft a fine query!!
>
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
>
> "Brad Schulz" <BradSchulz(a)discussions.microsoft.com> wrote in message
> news:548AB3BA-28AD-4263-9D3D-587B95711271(a)microsoft.com...
> > Jeff and Justin...
> >
> > I have no doubt at all that Plamen could solve the challenge perfectly,
> > with
> > his eyes blindfolded and his hands tied behind his back. He has better
> > T-SQL
> > skills than anybody I know.
> >
> > Thank you to Plamen, though, for not taking the bait and posting more code
> > in response. I appreciate that.
> >
> > Good luck to the 3 J's in the challenge (Jay, Jeff, Justin).
> >
> > --Brad
> >
> >
>
>
> .
>