Forum Replies Created

Viewing 15 posts - 4,816 through 4,830 (of 7,610 total)

  • RE: logging without blocking?

    Does the log table have an identity column? Did you try removing that column and see if the table is still locked? Typically multiple tasks should be able...

  • RE: Difference count

    You certainly don't need a calendar table for that simple a calculation! All you need is:

    SELECT (DATEDIFF(MONTH, 0, @enddate) / 3) - (DATEDIFF(MONTH, 0, @startdate) / 3) + 1

    declare...

  • RE: need to return all rows from any table containing a value range in a specified column

    Hrothgar (9/4/2015)


    That's a very good and very helpful solution; very many thanks.

    As the results seem to come out in an arbitrary order, or at least in an order that I...

  • RE: Get blank ('') in datediff function

    Jacob Wilkins (9/1/2015)


    ScottPletcher (9/1/2015)


    Jacob Wilkins (9/1/2015)


    ScottPletcher (9/1/2015)


    Jacob Wilkins (9/1/2015)


    I know it's rather off-topic, but it's an interesting diversion, so I thought I'd just chime in on NOLOCK and temporary tables.

    SELECT...

  • RE: Huge headache to work with big data

    I can't see the screenshot. A screenshot is pretty useless anyway. Actual text would be much better.

    But, in short, here's the approach I recommend:

    1) encode the large varchar...

  • RE: need to return all rows from any table containing a value range in a specified column

    Lynn Pettis (9/3/2015)


    ScottPletcher (9/3/2015)


    Very busy at work, just now was able to complete the code. I'll go ahead and post it as an alternative. I prefer a "template"...

  • RE: need to return all rows from any table containing a value range in a specified column

    Very busy at work, just now was able to complete the code. I'll go ahead and post it as an alternative. I prefer a "template" approach, so that...

  • RE: Finding all relations between tables. How ?

    ben.brugman (9/3/2015)


    Thanks Scott,

    More elegant, more compact and it did uncover a mistake in my solution.

    (My parent_column was not correct, I had not noticed that yet.).

    Thanks,

    Ben

    Edit:

    Second check,

    , COL_NAME(parent_object_id, parent_column_id) as Parent_column

    Does...

  • RE: [T-SQL] Question involving Job,Cursors, SP and DBMail

    When you concatenate strings, you must insure that higher-precedence data types are first converted to strings. Try something like this:

    SET @Q1 = N'exec RPT_MailOps '''+CAST(@ID...

  • RE: Get blank ('') in datediff function

    Lynn Pettis (9/2/2015)


    ScottPletcher (9/2/2015)


    Lynn Pettis (9/2/2015)


    ScottPletcher (9/2/2015)


    Finally, there's the cost to fix each issue.

    Once people are properly convinced that NOLOCK is a bad idea in many, many cases, they simply...

  • RE: Get blank ('') in datediff function

    Lynn Pettis (9/2/2015)


    ScottPletcher (9/2/2015)


    Finally, there's the cost to fix each issue.

    Once people are properly convinced that NOLOCK is a bad idea in many, many cases, they simply remove those specific...

  • RE: Delete statement taking too much time..?

    Don't disagree with other comments. But maybe I can give you a quick fix, and maybe not.

    First, you need an index on CSV_Details keyed first by Mark_Rev_No_fab that contains...

  • RE: Get blank ('') in datediff function

    Finally, there's the cost to fix each issue.

    Once people are properly convinced that NOLOCK is a bad idea in many, many cases, they simply remove those specific bytes -- "WITH...

  • RE: Get blank ('') in datediff function

    Lynn Pettis (9/1/2015)


    Sean Lange (9/1/2015)


    ScottPletcher (9/1/2015)


    Honestly, though, I still think that overall the "use identity as the 'default' clustering key" myth is even more damaging than an "almost always use...

  • RE: Get blank ('') in datediff function

    Lynn Pettis (9/1/2015)


    Sean Lange (9/1/2015)


    ScottPletcher (9/1/2015)


    Honestly, though, I still think that overall the "use identity as the 'default' clustering key" myth is even more damaging than an "almost always use...

Viewing 15 posts - 4,816 through 4,830 (of 7,610 total)