Forum Replies Created

Viewing 15 posts - 5,266 through 5,280 (of 8,416 total)

  • RE: T-SQL: Why “It Depends”

    Evan Yates (3/16/2010)


    In the past I have used this technique to find the "latest" record for each Product:

    ...NOT EXISTS...

    Against my test data it out-performs the other three methods at the...

  • RE: Today's Random Word!

    Lynn Pettis (3/16/2010)


    As often as I write cursors, it probably would have taken just as long.

    I see. I write a fair number of cursors, usually for drip-feeding semi-bulk data...

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (3/16/2010)


    All this code on THE THREAD is a disturbance in the force.

    I thought I could get away with eight lines!

  • RE: T-SQL: Why “It Depends”

    GabyYYZ (3/16/2010)


    (or is someone willing to defend keeping Autoshrink on?)

    Hey Gaby 😀

    Auto-close and Auto-shrink default to true on MSDE (2000). I worked at a large international retail chain once,...

  • RE: Are the posted questions getting worse?

    GSquared (3/16/2010)


    Good point. I've used that one. Easy enough to put an explicit date in there. Same way I do when I need to do seconds or...

  • RE: Today's Random Word!

    Lynn Pettis (3/16/2010)


    The only problem was the time it took to rewrite dynamic sql. Getting all the single quotes (') right is a RPITB, but once done, it's done.

    I...

  • RE: Are the posted questions getting worse?

    Luke L (3/16/2010)


    Michael Valentine Jones pointed out to me once that using 0 instead of 17530101 can cause issues on date calculations where you are dealing with dates prior to...

  • RE: Today's Random Word!

    Lynn Pettis (3/16/2010)


    Turned out I ended up rewriting my own routine to use ALTER USER instead of sp_change_user_login (thanks Paul).

    LOL. You should have edited your previous post instead and...

  • RE: T-SQL: Why “It Depends”

    timothyawiseman (3/16/2010)


    Excellent Article. Thank you for providing it. I will be passing this off to some of my friends soon.

    You mean "passing it on"...right? 😉

    Passing it off would...

  • RE: Are the posted questions getting worse?

    jcrawf02 (3/16/2010)


    point taken, but the uncertainty is definitely a lot smaller. (the zero date won't change every four years)

    Neither will 365 days 😛 😀

    Ok, seriously, it wasn't the inaccurate number...

  • RE: T-SQL: Why “It Depends”

    Joe Celko (3/16/2010)


    My thought with "MAX(sale_date) OVER (PARTITION BY product_nbr)" is that you can catch the MAX(sale_date) as you scan for the partitioning. There is no need to do...

  • RE: Are the posted questions getting worse?

    jcrawf02 (3/16/2010)


    Paul White (3/15/2010)


    In fact it is as bad as DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP), 0).

    All right Paul, edumacate me. Why is this bad?

    Zero is not a date any more than...

  • RE: T-SQL: Why “It Depends”

    tamie.mcdonald (3/16/2010)


    We have many logical clustered indexes larger than this and do not experience page splitting. Our databases with the volume of data in them would not perform with...

  • RE: T-SQL: Why “It Depends”

    tamie.mcdonald (3/16/2010)


    ...on the SalesDetail table placing the unique clustured index on product, salesdate desc, and id would have been considered to keep all of the sales data for a particular...

  • RE: Are the posted questions getting worse?

    Roy Ernest (3/16/2010)


    It is a good challenge. It made me learn more about the topic I was writing about.

    I imagine so. Well done!

Viewing 15 posts - 5,266 through 5,280 (of 8,416 total)