Forum Replies Created

Viewing 15 posts - 45,541 through 45,555 (of 59,095 total)

  • RE: Slack SQL Server

    Gift Peddie (1/26/2009)


    Update using the FROM clause violates JOINs are idempotent rule in relational algebra.

    Heh... ummmm... so what? Cursors violate the whole idea of a database but they continue...

    --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: Trying to convert number range (1-5) to numerical progression (1,2,3,4,5)

    Thanks for the feedback, Tony. And, anyone who wants to learn more about how a Tally table works to replace some loops, here's a pretty good (heh... if I...

    --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: Converting rows into columns

    And, if you take a look at the following article, you'll find the "old fashioned way" actually has a bit of a performance edge over the PIVOT method...

    [font="Arial Black"]Cross Tabs...

    --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: Slack SQL Server

    Actually... I take that back. They need to leave UPDATE FROM the heck alone so that we can still use the "Quirky Update" for "data smears" even if they...

    --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: Slack SQL Server

    GSquared (1/26/2009)


    rog pike (1/26/2009)


    Jeff Moden (1/26/2009)


    I absolutely agree... and one of my favoritie proprietary pieces of code is UPDATE FROM... if that were not available, you'd end up having to...

    --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: Slack SQL Server

    rog pike (1/26/2009)


    Jeff Moden (1/26/2009)


    I absolutely agree... and one of my favoritie proprietary pieces of code is UPDATE FROM... if that were not available, you'd end up having to do...

    --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?

    Man, sorry, Gus... :blush: I meant a "While Loop" for the count comparison, lost my mind, and said "Cursor" instead. A WHILE LOOP has about the same speed...

    --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: Replace Command

    The proper way to do such a detection is similar to the following where '1D3' could be a column name...

    [font="Courier New"] SELECT 1 AS IsAllDigits

    WHERE '1D3' NOT LIKE...

    --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: Replace Command

    Be careful... ISNUMERIC should never be used as an "IS ALL DIGITS" function... For example...

    SELECT ISNUMERIC('1D3'), ISNUMERIC('1E3'), ISNUMERIC('1.3'), ISNUMERIC('-13')

    --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: The Set-Based Limit

    GSquared (1/26/2009)


    Is that from when I told someone to stop using those on you, Jeff? Just last week, if I remember correctly.

    Yes, Sir! And I have to tell...

    --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: What is RBAR? How can I avoid it?

    Lynn Pettis (1/26/2009)


    Cardinal Moden is an excellent resource in the fight against RBAR. I must admit to having learned quite a bit from his excellent mentoring via SSC.

    Dang, Lynn......

    --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: What is RBAR? How can I avoid it?

    Sankar Reddy (1/26/2009)


    Jeff, Thanks for your timely good spanking for using the TVF. I wouldn't use/propose this next time and you will see me use the numbers table here next...

    --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 answers getting worse?

    GilaMonster (1/26/2009)


    Jeff Moden (1/26/2009)


    The backup to such a "break" for the quirky update method is that the ORDER BY method also works although it works at about half the speed....

    --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: Newbie:Why is select doing a table scan?

    GilaMonster (1/26/2009)


    If that table is frequently inserted into, then I'd suggest put the cluster on the identity, even if it's never used. That way the cluster will organise the table...

    --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: Slack SQL Server

    As a side bar, I've finally discovered the true meaning of the acronym "CLR"...

    [font="Arial Black"]C[/font]ursors, [font="Arial Black"]L[/font]oops, and other [font="Arial Black"]R[/font]BAR. 😛

    --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 - 45,541 through 45,555 (of 59,095 total)