Are the posted questions getting worse?

  • I am wearing my colander.

    I just didn't have it on the day the picture was taken 😉

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Hey y'all. I think I finally have something that would make a good short article. Have any of you ever seen something like this? It looks like a really fast technique... to solve a problem that will make Jeff throw pork chops 😀

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Bob Hovious 24601 (10/27/2009)


    Hey y'all. I think I finally have something that would make a good short article. Have any of you ever seen something like this? It looks like a really fast technique... to solve a problem that will make Jeff throw pork chops 😀

    Pretty slick - just tested it and it looks pretty good. Watching for Pork chops now:hehe:

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Bob Hovious 24601 (10/27/2009)


    Hey y'all. I think I finally have something that would make a good short article. Have any of you ever seen something like this? It looks like a really fast technique... to solve a problem that will make Jeff throw pork chops 😀

    Interesting. I may have to try it out tomorrow. I'm going semi-brain dead for tonight. Trying to get a couple of blog posts, non-technical in and then bed.

  • Nope... no pork chops on UNPIVOT. It' a tried and true method... I just wish they'd make PIVOT and UNPIVOT a little more automatic like they did with PIVOT in MS Access.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Bob Hovious 24601 (10/27/2009)


    Hey y'all. I think I finally have something that would make a good short article. Have any of you ever seen something like this? It looks like a really fast technique... to solve a problem that will make Jeff throw pork chops 😀

    Wild. I don't know how you guys come up with these things. My brain just doesn't work like that.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Jeff, I thought the problem would make you want to fling pork chops. You usually hate breaking things apart and putting them together in the database instead of the presentation layer.

    Grant, all joking aside, here's what happened. I knew Crosstab/Case would require multiple passes through the source table, and that UNPIVOT was the only way to make it with one pass. I did a little experimenting, trying to figure out how to apply it to the column pairs in Wayne's problem. I tried a couple of things that failed, and finally accepted that UNPIVOT was only going to combine one half of the pair. (It only allows a single FOR...IN....)

    At first I was thinking of possibly concatenating the values in the pairs with a cte and then breaking them apart again after the UNPIVOT. But while I was experimenting, I tried a SELECT * out of the UNPIVOT subquery. That let me see the detail of what was available, and it was readily apparent that everything available to do a crosstab/case was present.

    I stumbled into it, but that's just because I'm willing to go stumbling around in the dark. 😉

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Bob Hovious 24601 (10/27/2009)


    I stumbled into it, but that's just because I'm willing to go stumbling around in the dark. 😉

    Well now that I can do, but I usually end up with barked shins and scratches, not functional TSQL code.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey (10/27/2009)


    Bob Hovious 24601 (10/27/2009)


    I stumbled into it, but that's just because I'm willing to go stumbling around in the dark. 😉

    Well now that I can do, but I usually end up with barked shins and scratches, not functional TSQL code.

    Glad I'm not the only one.

  • Hey, don't think I always stumble into sweet-smelling stuff. :w00t:

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Jeff Moden (10/27/2009)


    Grant Fritchey (10/27/2009)


    Jeff Moden (10/26/2009)


    Crap... I can say "crap" on this post, right? Crap, crap, crap... it's happened again same as last year and for the same reason. Started a new job on October 19th and, once again, eating and paying bills has to come before PASS especially with the love of my life also being out of work. Crap. I'm not going to make it again this year. "Crap" isn't really what I'm thinking but it's the nicest thing I can come up with on the spur of the moment. I guess I should just be thankful that I found a new job so quickly. Crap...

    Nooooo!

    I understand, but... Nooooooo!

    You're doing the right thing, of course, but ... Noooooo!

    Nuts. Now I'm really mad that I didn't go out for drinks with you when you where in RI.

    Heh... that's a lesson in political correctness for me. "Nooooooo" is the polite way for saying "Craaaaapppp". 😛

    There're a lot of folks I wanted to meet and some that I wanted to "meat" 😉 This sucks so bad that it has its own gravity field.

    Dude. I hear that. 🙁

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • It's a black hole of suckishness... beyond the event horizon, even.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • God damn i need to step away from this, spending far to much time on it

    http://ask.sqlservercentral.com/questions/826/the-fifo-stock-inventory-sql-problem



    Clear Sky SQL
    My Blog[/url]

  • Jack Corbett (10/27/2009)


    Grant Fritchey (10/27/2009)


    Bob Hovious 24601 (10/27/2009)


    I stumbled into it, but that's just because I'm willing to go stumbling around in the dark. 😉

    Well now that I can do, but I usually end up with barked shins and scratches, not functional TSQL code.

    Glad I'm not the only one.

    Makes me feel better knowing that some of the giants are also in the same boat.

    Nice stumbling Bob.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Hey Jason, better go look at that thread again.

    I stumbled past what looks to be a much cleaner solution from Peter Brinkhaus. We're just waiting on Wayne to tell us if one outperforms the other. I'm actually rooting for Peter's solution, because I think it reads easier because it doesn't have to blend UNPIVOT and CrossTab.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 8,836 through 8,850 (of 66,712 total)

You must be logged in to reply to this topic. Login to reply