April 20, 2010 at 8:41 pm
Paul White NZ (4/20/2010)
pYak (4/20/2010)
are there any particular cases that you can think of where using the PIVOT operator would be more appropriate?Not really, no. The PIVOT is shorthand for a very similar CASE construction - look closely at the execution plans and you'll see the close similarity. PIVOT is not as flexible though, and is often slightly slower.
I absolutely agree with what Paul said in the quote above. To back up both our claims in that area, here's the link to the article (just in case anyone missed it) that demonstrates both of those claims to an extent, again...
http://www.sqlservercentral.com/articles/T-SQL/63681/
--Jeff Moden
Change is inevitable... Change for the better is not.
April 20, 2010 at 8:46 pm
COldCoffee (4/20/2010)
Jeff, you really are a wonderful character.. and for paul and karthik, thanks for providing new views and test results.. u guys are simply great.. thanks all 🙂
Shucks. :blush: Thanks, COldCoffee. You and the others made this thread a lot of fun. Thank you for the code you posted and the great attitude that prompted you to do so.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 21, 2010 at 5:41 am
Jeff Moden (4/20/2010)
COldCoffee (4/20/2010)
Jeff, you really are a wonderful character.. and for paul and karthik, thanks for providing new views and test results.. u guys are simply great.. thanks all 🙂Shucks. :blush: Thanks, COldCoffee. You and the others made this thread a lot of fun. Thank you for the code you posted and the great attitude that prompted you to do so.
:blush: Thanks sir !
Viewing 3 posts - 31 through 32 (of 32 total)
You must be logged in to reply to this topic. Login to reply