Forum Replies Created

Viewing 15 posts - 50,311 through 50,325 (of 59,099 total)

  • RE: WITH (NOLOCK)

    I agree... shared locks on a set of reporting tables aren't much more expensive than using a WITH (NOLOCK), and WITH (NOLOCK) will not prevent deadlocks. Don't forget that...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: sa removal

    I can't get over the gut feeling that it's a bad idea, but here goes...

    First, make sure that some other user, preferably some DBA (yourself?) has SA privs.

    Second, open SSMS...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Errors with Select query

    One more quick question... which table are all the times (and other columns) coming from? I can't tell because you're not using table aliases on the columns. The...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Sorting the Sheep from the Goats

    I agree with Gus... multiple-choice questions make a test easy to grade and that's all. My "favorite" multiple choice question looks something like the following...

    Which of the following roles...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Errors with Select query

    I don't see why you need a CASE statement to begin with...

    CONVERT(DECIMAL(6,2),ISNULL(SUM(CONVERT(NUMERIC,CRC.Contact))/NULLIF(SUM(TalkTime+HoldTime+WrapTime+WaitTime+PreviewTime+DeadTime)/3600.0,0),0))

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: parsename

    One simple forumla will return correctly whether the domain is present or not...

    DECLARE @MyDomainName SYSNAME

    SET @MyDomainName = 'firstname.lastname'

    SELECT SUBSTRING(@MyDomainName,CHARINDEX('\',@MyDomainName)+1,128)

    SET @MyDomainName = 'DOMAIN\firstname.lastname'

    SELECT...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: exec sp_executesql

    p.s.

    I don't know what the code is actually trying to do nor why you feel you need dynamic SQL to do it, but if you break all the lines just...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: exec sp_executesql

    Issam,

    Are you simply trying to slice a given number into slices containing 3 digits each?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Errors with Select query

    Yes, but that bit of math is the divisor in a larger formula...

    CASE WHEN (SUM(CONVERT(NUMERIC,CRC.Contact))*100) <> 0.0 THEN ISNULL(CONVERT(DECIMAL(6,2),(SUM(CONVERT(NUMERIC,CRC.Contact))/(CONVERT(DECIMAL(6,2),(SUM(TalkTime + HoldTime + WrapTime + WaitTime + PreviewTime +...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: sa removal

    If you simply rip the SA rug out from under them, you'll make a lot of enemies... you need to get management to buy into a good security plan where...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: decrypt sql server 2005 sp

    Ok... thanks...

    Like the others have said, if you do a Google or other search, you'll find several articles on how to do this. It's just not something that most...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: User Defined Function With CTE

    Marvin,

    So, is the CTE a good enough solution for you?

    Shifting gears a bit... its pretty clever how they put the test question assessment list together so that it works against...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: decrypt sql server 2005 sp

    avipenina (5/21/2008)


    hi,

    how can i decrypt a stored procedure in sql server 2005?

    THX

    I'm curious... where is your source code? Or are to trying to break in on someone else?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Query to retrive distinct id in child table

    sharma (5/24/2008)


    Hi i need a query for below scnario

    [font="Arial Black"]TblMaster[/font]

    ID NAME

    100 James

    101 Joseph

    102 Felix

    103 bernadsha

    [font="Arial Black"]TblChild[/font]

    ID NAME LOCATION

    100 James New Jersy

    101 Joseph California

    102 Felix New York

    103...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Errors with Select query

    Obviously, the following creates a zero somewhere...

    TalkTime + HoldTime + WrapTime + WaitTime + PreviewTime + DeadTime

    What do you want to do when you have a zero in that simple...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 50,311 through 50,325 (of 59,099 total)