Forum Replies Created

Viewing 15 posts - 1,411 through 1,425 (of 8,416 total)

  • RE: Are the posted questions getting worse?

    GSquared (12/30/2011)


    I've fielded about a dozen forum questions about locking over the last couple of weeks, and in one of them, someone asked me to write a common-language article on...

  • RE: top 80 percent from sum

    roryp 96873 (12/30/2011)


    Thanks Paul, I haven't made it through the comments in that article yet, but I will be sure to read through them. That error came from me...

  • RE: Issue with singleton lookup sporadically taking far too long

    Some general comments:

    I agree with Craig that the current indexing arrangement is probably not optimal for these lookups. A narrow unique index on the loyalty identifier that (implicitly or...

  • RE: top 80 percent from sum

    roryp 96873 (12/29/2011)


    After reading Jeff Moden's article that Drew suggested (which was straightforward and very helpful), I came up with this solution. The problem is that it will only...

  • RE: top 80 percent from sum

    A SQL Server 2012 solution, for comparison's sake:

    DECLARE @data TABLE

    (

    item INTEGER NOT NULL

    )

    ;

    INSERT @data

    (item)

    VALUES

    (60),

    ...

  • RE: How to get the max of records in row_number

    PaulB-TheOneAndOnly (12/29/2011)


    how about replacing:

    over (partition by account_number order by end_date asc ) by:

    top 1 over (partition by account_number order by end_date desc)

    That would be cool, but SQL Server does not...

  • RE: how to get seconds from my time ....

    DECLARE @time TIME = '20:10:10'

    SELECT total_seconds =

    DATEPART(SECOND, @time) +

    60 * DATEPART(MINUTE, @time) +

    3600 * DATEPART(HOUR, @time)

  • RE: Concurrent Operations

    SQLRNNR (12/28/2011)


    Badda bing - log backups. People should know this one.

    True - but this was a change (in 2005) so for many people the change in behaviour will still...

  • RE: Query Tuning

    Jeff Moden (12/28/2011)


    Heh... there goes THAT question.

    It's always worth re-doing, it catches a lot of people out (and no-one reads these comments anyway :-))

  • RE: Encryption

    I love it when a (only slightly educated) guess pays off 🙂

  • RE: Query Tuning

    Hugo Kornelis (12/27/2011)


    ...the ISNULL expression could be rewritten [...] maybe this will indeed happen if the table is large enough to warrant using all phases of the optimizer to do...

  • RE: Query Tuning

    For anyone wondering about the cryptic comment in the UPDATE statement:

    UPDATE dbo.Event

    SET EndDate = DATEADD(dd,

    ...

  • RE: Query Tuning

    There's always a temptation with QotD to keep expanding it until the question is 'perfect'. This question seems to have fallen victim to that temptation; in attempting to cover...

  • RE: Christmas Fun

    Interesting - I cheated, obviously, and found there are nine, but it appears eight is also right:

    http://en.wikipedia.org/wiki/Santa_Claus%27s_reindeer

  • RE: Happy Holidays

    Americans. Sigh.

    Happy Christmas, wherever you are. Off to find some forum questions to replace the seven points missed here today.

Viewing 15 posts - 1,411 through 1,425 (of 8,416 total)