Forum Replies Created

Viewing 15 posts - 6,691 through 6,705 (of 7,597 total)

  • RE: get the first and last day of any Year/Month

    Jeff Moden (3/1/2013)


    ScottPletcher (3/1/2013)


    Code reuse is another tricky subject. It generally gets talked about far more often than it is genuinely done. A few developers are bad enough,...

  • RE: Select full month number (with 0)

    Sean Lange (3/1/2013)


    ScottPletcher (3/1/2013)


    Or simply:

    SELECT CONVERT(char(2), myDate, 1)

    I don't think will quite work Scott. The OP said they are using month(MyDate) which will return an int. Casting a single digit...

  • RE: Kill alter Index rebuild Jobs

    First, make sure you're checking index fragmentation and only rebuilding indexes that actually need it.

    Also, if you have tempdb properly tuned, look into using "SORT_IN_TEMPDB = ON" option when rebuilding...

  • RE: Select full month number (with 0)

    Or simply:

    SELECT CONVERT(char(2), myDate, 1)

  • RE: SQL Agent skipping job execution

    Just trying to find something that fits the symptoms...

    Is it possible that a db was deleted (offlined???) during your processing?! Perhaps a process that deletes and then restores a...

  • RE: get the first and last day of any Year/Month

    Lynn Pettis (3/1/2013)


    ben.brugman (3/1/2013)


    Jeff Moden (2/26/2013)


    Just be aware that string conversions of dates will be a bit slower than integer conversions. It'll take a million rows to notice a...

  • RE: get the first and last day of any Year/Month

    Jeff Moden (3/1/2013)


    Eugene Elutin (2/28/2013)


    This cut down number of CPU cycles when performing multiplication as it takes less number of bit-moves for multiplying smaller numbers - I should accept that...

  • RE: Help getting all the weeks between two random dates for each row

    Please see if this gives you a useful result:

    SELECT

    siwh.ItemNumber, siwh.StoreNumber, w.Weeks

    FROM #StoreItemWeeksHave siwh

    INNER JOIN #Weeks w ON

    w.Weeks BETWEEN siwh.WeekStart AND siwh.WeekFinish

    ORDER BY

    ...

  • RE: Is a doomed transaction inevitable if deadlock occurs in a trigger (SQL Server 2008 R2)?

    Eugene Elutin (2/28/2013)


    davidsatz (2/28/2013)


    So I am not hearing anyone disagree with my conclusion that there is no way to accomplish this...:ermm:

    I'm not exactly sure what you are looking to do,...

  • RE: Adding an extra file to TEMPDB

    Int'l Paper also was buying lots of companies for awhile, some of them other paper companies.

    During a merger, there are legal restrictions on what can and can't be viewed, in...

  • RE: Adding an extra file to TEMPDB

    Robert Davis (2/28/2013)


    Exactly. If the drive space is there, why not allocate it? I'm not going to use it for anything else.

    The reason for allocating multiple files is to avoid...

  • RE: Adding an extra file to TEMPDB

    Robert Davis (2/28/2013)


    ScottPletcher (2/28/2013)


    I have additional space to grow, you prevent it.

    So if a task unexpectedly needs, say, 50MB more of tempdb space to complete, you abend it -- perhaps...

  • RE: Adding an extra file to TEMPDB

    GilaMonster (2/28/2013)


    ScottPletcher (2/28/2013)


    GilaMonster (2/28/2013)


    ScottPletcher (2/28/2013)


    GilaMonster (2/28/2013)


    ScottPletcher (2/28/2013)


    If the temp files are growing, I don't want to allocate them smaller and force them to grow every time SQL starts: that's a...

  • RE: Adding an extra file to TEMPDB

    Robert Davis (2/28/2013)


    ScottPletcher (2/28/2013)


    So if tempdb now does need to grow for whatever reason, and it causes a SQL issue because it can't, you've guaranteed that there's no easy way...

  • RE: Adding an extra file to TEMPDB

    GilaMonster (2/28/2013)


    ScottPletcher (2/28/2013)


    GilaMonster (2/28/2013)


    ScottPletcher (2/28/2013)


    If the temp files are growing, I don't want to allocate them smaller and force them to grow every time SQL starts: that's a waste of...

Viewing 15 posts - 6,691 through 6,705 (of 7,597 total)