Forum Replies Created

Viewing 15 posts - 586 through 600 (of 4,080 total)

  • RE: random records

    Okay, I just had to do some testing.

    If frontloading isn't an issue, you can use the following in place of the CHECKSUM test and get similar results with fewer CPU...

    __________________________________________________

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

  • RE: random records

    Jeff Moden (3/4/2014)


    Personally, I use a dart board. 😛

    How hard to you have to fling a pork chop to make it stick, Jeff? 😀

    __________________________________________________

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

  • RE: random records

    Lamprey13 (12/16/2010)


    Here is another method I've seen/used that is pretty similar to the ORDER BY NEWID(), but much faster:

    SELECT TOP 10 * FROM MyTable

    WHERE 0.01 >= CAST(CHECKSUM(NEWID(), SomeColumnName) & 0x7fffffff...

    __________________________________________________

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

  • RE: random records

    Here is a patch for the original code that was intended to find a small number of rows (50). It assumes that the key number N in...

    __________________________________________________

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

  • RE: random records

    KoldCoffee (3/4/2014)


    Hi Dixie Flatline, I saw this on another post and was trying to understand it so I appreciate that you explained the code more in this version. I...

    __________________________________________________

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

  • RE: random records

    Masterful? Do you need to borrow money or something, Jason?

    __________________________________________________

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

  • RE: random records

    Here is another way to improve performance while ensuring the desired number of rows. (see attachment) Whether or not you really need the performance gain depends on...

    __________________________________________________

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

  • RE: Are the posted questions getting worse?

    TomThomson (2/25/2014)[/b]


    The Dixie Flatline (2/25/2014)


    rodjkidd (2/25/2014)


    Steve Jones - SSC Editor (2/24/2014)


    I went to the Rock and Roll Hall of Fame in Cleveland a few weeks ago. It was pretty neat...

    __________________________________________________

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

  • RE: Are the posted questions getting worse?

    rodjkidd (2/25/2014)


    Steve Jones - SSC Editor (2/24/2014)


    I went to the Rock and Roll Hall of Fame in Cleveland a few weeks ago. It was pretty neat to see the history...

    __________________________________________________

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

  • RE: A Quick Tour of sp_ExecuteSQL

    Tom Bakerman (2/24/2014)


    BXRWXR (2/24/2014)


    How is this different from plain old EXEC(@SomeSQLStatement)?

    BR

    One big difference is that with sp_ExecuteSQL you can define parameters external to the @SomeSQLStatement variable, thereby reusing the dynamic...

    __________________________________________________

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

  • RE: Are the posted questions getting worse?

    GilaMonster (2/20/2014)


    stormsentinelcammy (2/20/2014)


    will this forum thread ever get back on topic?

    After over 40 000 posts, I don't think it has a topic any longer.

    I think that's one of the worst...

    __________________________________________________

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

  • RE: Are the posted questions getting worse?

    SQLRNNR (2/19/2014)


    Yay - I'm finally insane!!! :hehe::w00t:

    Finally?

    This comes as a surprise why exactly?

    __________________________________________________

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

  • RE: Today's Random Word!

    JAZZ Master (2/13/2014)


    crookj (2/13/2014)


    WotD - ubiquity

    omnipresence

    omnipotence

    __________________________________________________

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

  • RE: Today's Random Word!

    L' Eomot Inversé (2/11/2014)


    Revenant (2/11/2014)


    Ed Wagner (2/11/2014)


    Kurt W. Zimmerman (2/11/2014)


    jcrawf02 (2/11/2014)


    Ed Wagner (2/11/2014)


    BWFC (2/11/2014)


    SQLRNNR (2/11/2014)


    Ed Wagner (2/11/2014)


    BWFC (2/11/2014)


    Ed Wagner (2/11/2014)


    SQLRNNR (2/10/2014)


    Ed Wagner (2/10/2014)


    SQLRNNR (2/10/2014)


    Stuart Davies (2/10/2014)


    Ed Wagner (2/10/2014)


    crookj (2/10/2014)


    Stuart Davies...

    __________________________________________________

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

  • RE: Are the posted questions getting worse?

    jcrawf02 (2/11/2014)


    wolfkillj (2/7/2014)


    ChrisM@Work (2/7/2014)


    Anybody else seeing a kinky image of Koen, Gail and Grant wondering around without their tshirts?

    Word is that there are photos of a shirtless Grant from SQL...

    __________________________________________________

    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 - 586 through 600 (of 4,080 total)