Forum Replies Created

Viewing 15 posts - 39,646 through 39,660 (of 59,072 total)

  • RE: Help- Very Complex SQL query

    mister.magoo (2/23/2010)


    For those interested, here's the proper way to write the code following "my" best practices...

    UPDATE dbo.TableA

    SET SomeColumn = b.SomeOtherColumn

    FROM dbo.TableA ...

    --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: FizzBuzz

    That certainly works and it's a whole lot better than a WHILE loop. It certainly shows that you have more than just a casual knowledge (as previous similar examples...

    --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: Help- Very Complex SQL query

    Jeff Moden (2/23/2010)


    Paul White (2/22/2010)


    Jeff Moden (2/22/2010)


    I guess I didn't understand that one... it sets all the rows to 50 instead of doing the requested data smear.

    It works on...

    --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: Help- Very Complex SQL query

    WayneS (2/22/2010)


    Paul White (2/22/2010)


    WayneS (2/22/2010)


    I must have missed the updated requirements... let me look at what those are and see what I can do.

    The updated test data setup script is...

    --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: Help- Very Complex SQL query

    Paul White (2/22/2010)


    Jeff Moden (2/22/2010)


    I guess I didn't understand that one... it sets all the rows to 50 instead of doing the requested data smear.

    It works on my system...

    --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: FizzBuzz

    Steve Jones - Editor (2/23/2010)


    Since this became a performance discussion, I added a question on ASK about the best method. I know someone might memorize this for an interview, but...

    --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: Solving the "Running Total" & "Ordinal Rank" Problems (Rewritten)

    tony rogerson (2/18/2010)


    Yes - I do mean a cursor; a static one and not a "update where current".

    I don't honestly know what your problem is here Paul - even Jeff...

    --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: FizzBuzz

    Gary Varga (2/23/2010)


    Jeff Moden (2/23/2010)


    You're right, Gary... it might make a good article called "Winning the Interview with Code" or somesuch.

    OK. Perhaps two articles. The one you suggest should highlight...

    --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: Are the posted questions getting worse?

    jcrawf02 (2/23/2010)


    Paul White (2/23/2010)


    Jeff Moden (2/22/2010)


    Send it to me... we had a sequence table that was responsible for an average of 640 deadlocks a day before we fixed it. ...

    --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: Are the posted questions getting worse?

    Paul White (2/23/2010)


    Jeff Moden (2/22/2010)


    Send it to me... we had a sequence table that was responsible for an average of 640 deadlocks a day before we fixed it. I'd...

    --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: FizzBuzz

    Tom.Thomson (2/22/2010)


    First I tried writing a set-based solution which had to generate its numbers table (so that it would scale beyond my pre-existing tally table) and the I tried writing...

    --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: FizzBuzz

    Gary Varga (2/23/2010)


    Jeff,

    I have followed this thread from the start and I have read the article of yours you recommended. I was hoping to work out what solution you are...

    --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: FizzBuzz

    Manie Verster (2/23/2010)


    Take note, you only have to do 100 records for this interview.

    True enough... and the interviewer will send all of those people who only make it capable of...

    --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: FizzBuzz

    Manie Verster (2/23/2010)


    Jeff I am on your case today.

    No problem, Manny... I'm on your's, as well but I did install some handrails so you can enjoy the ride. ...

    --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: FizzBuzz

    Manie Verster (2/23/2010)


    It is good to take a standpoint Jeff and stick to it but there is a thing called obsessiveness. I tested this query against the one I posted...

    --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 - 39,646 through 39,660 (of 59,072 total)