Are the posted questions getting worse?

  • CirquedeSQLeil (11/12/2009)


    Alvin Ramard (11/12/2009)


    CirquedeSQLeil (11/12/2009)


    amazing how the thread can make a day go from bad to better. At least one good laugh a day.

    At first I thought you said the thread went from bad to better. I was going to say: "What???"

    Sorry if you're not having a good day. We try to make everybody's day better on here.

    Oh the day got a whole lot better looking at the thread (and all the while not looking 🙂 ).

    I have to fix doughhead mistakes by my predecessors. This person thought that AVG was interchangeable with SUM.

    ... doughhead mistakes ... from half baked ideas?

    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (11/12/2009)


    CirquedeSQLeil (11/12/2009)


    Alvin Ramard (11/12/2009)


    CirquedeSQLeil (11/12/2009)


    amazing how the thread can make a day go from bad to better. At least one good laugh a day.

    At first I thought you said the thread went from bad to better. I was going to say: "What???"

    Sorry if you're not having a good day. We try to make everybody's day better on here.

    Oh the day got a whole lot better looking at the thread (and all the while not looking 🙂 ).

    I have to fix doughhead mistakes by my predecessors. This person thought that AVG was interchangeable with SUM.

    ... doughhead mistakes ... from half baked ideas?

    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂

    And then throw in the possible rounding errors as well and it may not be accurate either. 😛

  • Lynn Pettis (11/12/2009)


    Alvin Ramard (11/12/2009)


    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂

    And then throw in the possible rounding errors as well and it may not be accurate either. 😛

    SUM = AVG * COUNT * (1/Accuracy Factor) * Fudge Factor



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (11/12/2009)


    Lynn Pettis (11/12/2009)


    Alvin Ramard (11/12/2009)


    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂

    And then throw in the possible rounding errors as well and it may not be accurate either. 😛

    SUM = AVG * COUNT * (1/Accuracy Factor) * Fudge Factor

    Wait, I think I've seen that formula before! It was in an accounting process at one of the places I used to work that went bankrupt! :w00t:

  • Jack Corbett (11/12/2009)


    Alvin Ramard (11/12/2009)


    Lynn Pettis (11/12/2009)


    Alvin Ramard (11/12/2009)


    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂

    And then throw in the possible rounding errors as well and it may not be accurate either. 😛

    SUM = AVG * COUNT * (1/Accuracy Factor) * Fudge Factor

    Wait, I think I've seen that formula before! It was in an accounting process at one of the places I used to work that went bankrupt! :w00t:

    Jack, I bet you fudge factor function was non-deterministic. That'll get you everytime!!!!

    🙂



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (11/12/2009)


    Jack Corbett (11/12/2009)


    Alvin Ramard (11/12/2009)


    Lynn Pettis (11/12/2009)


    Alvin Ramard (11/12/2009)


    AVG is not interchangeable with SUM. Was that written on the day the coffee pot ran dry?

    AVG*COUNT might be interchangeable with SUM, but too much trouble. 🙂

    And then throw in the possible rounding errors as well and it may not be accurate either. 😛

    SUM = AVG * COUNT * (1/Accuracy Factor) * Fudge Factor

    Wait, I think I've seen that formula before! It was in an accounting process at one of the places I used to work that went bankrupt! :w00t:

    Jack, I bet you fudge factor function was non-deterministic. That'll get you everytime!!!!

    🙂

    And here I was thinking that the accuracy factor being based on checksum(newid()) would be the bigger issue!

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • ... checksum(mewid()) ... now that's a whole different story, but it's effect is slightly more predictable.

    😎



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • .... hmmmmm .... using checksum(newid()) as a random number generator.

    Might be an idea for an article. 😉



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Jeff uses it when creating his million row test tables.

  • Ok - to 4 decimal places now.

    Avg = Sum

    Since we deal in pennies, anything after 4 decimal places could be rounded (in theory), and thus Avg could = Sum in some cases.

    Avg(1) = 1

    Sum(1) = 1

    Doesn't work too well for mulitple values unless I go this route *snicker*

    select sqrt(sqrt(power(sqrt(avg(isnull(mycolumn,0))),7)))- power(avg(isnull(mycolumn,0)),.62250384)

    from BLAH

    select sqrt(power(sqrt(sum(isnull(mycolumn,0))),3))

    from BLAH

    Thanks for inspiring me to find a way to make it work...;-)

    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

  • And for grins, just to tidy up a bit

    select round(sqrt(sqrt(power(sqrt(avg(isnull(mycolumn,0))),7)))- power(avg(isnull(SumOfpktloanPBO,0)),.62250384),2)

    from BLAH

    select round(sqrt(power(sqrt(sum(isnull(mycolumn,0))),3)),2)

    from BLAH

    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

  • Alvin Ramard (11/12/2009)


    .... hmmmmm .... using checksum(newid()) as a random number generator.

    Might be an idea for an article. 😉

    IIRC, it was Bob who asked me if he could write an article about using that technique. He asked me because I use it a lot (as Lynn said) in creating my normal million row test tables. Creating such tables is the key to being able to test technique for very high performance code.

    This will sound absolutely awful to most of you, but I asked him not to because the only people that I believe that deserve the full gambit on that technique are the people that see it on the forum posts. It's the one thing I've held back on writing an article about and just for that reason... I believe that some folks just need to earn their stripes instead of it being given to them on a silver platter.

    I'd prefer to not see such an article specifically covering the various data generators using that method for the reasons stated. Bob honored that request and, although I certainly can't stop anyone from writing such an article, would greatly appreciate it if the general public were allowed to continue to earn their stripes in that area.

    --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)

  • I completely confirm Jeff! Some random values are really important to ensure some fine tests.

    I prefer this method:

    😀

  • I wasn't being serious when I made a comment about an article.

    Jeff, Bob and I were out in the parking lot discussing what you just mentioned, about 45 minutes before you posted your comment.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (11/12/2009)


    I wasn't being serious when I made a comment about an article.

    Jeff, Bob and I were out in the parking lot discussing what you just mentioned, about 45 minutes before you posted your comment.

    So what did you guys come up with in that discussion?

    --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)

Viewing 15 posts - 9,211 through 9,225 (of 66,712 total)

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