Forum Replies Created

Viewing 15 posts - 30,751 through 30,765 (of 59,101 total)

  • RE: Get month names ordered using recursion

    Tony Palmeri (3/13/2012)


    I have a question. When you use "ROW_NUMBER" against an actual table, doesn't the query processor actually have to physically access that table, maybe do some disk...

    --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: Get month names ordered using recursion

    the sqlist (3/13/2012)


    CTE is nice at times but we have to keep in mind that it doesn't work on all platforms so I would avoid it

    I hope you don't...

    --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: Get month names ordered using recursion

    Burninator (3/13/2012)


    hrmmmm... what happens to report parts in case of armageddon?

    Heh... if you've written the code the way most managers want it, it will be reported as "on time and...

    --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: SQL Like Clause

    anthony.green (3/14/2012)


    Jeff Moden (3/13/2012)


    anthony.green (3/12/2012)


    you might want to take a look at full text indexing and the contains function then, otherwise you will be wrapping the variable in a multiple...

    --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: SQL Like Clause

    HanShi (3/14/2012)


    small typo in the code from Jeff Moden...

    SELECT * FROM dbo.mytable WHERE CHARINDEX(@FirstName,FirstName) + 0

    should be

    SELECT * FROM dbo.mytable WHERE CHARINDEX(@FirstName,FirstName) > 0

    :hehe:

    Thank you very much for the catch...

    --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: Is this a bug?

    Jeff Moden (3/14/2012)


    terryshamir (3/14/2012)


    For me its a bug, the guys who worked with it saw nothing wrong with it.

    Tell those guys I agree. If you learn to use 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: Is this a bug?

    terryshamir (3/14/2012)


    For me its a bug, the guys who worked with it saw nothing wrong with 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: Is this a bug?

    evelinel1f4r (3/14/2012)


    This is a historical bug that goes back to the original Sybase days

    It's not a "bug". It's a bloody feature! 😉 Ya just gotta know how 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: Is this a bug?

    evelinel1f4r (3/14/2012)


    Good programmers use the MERGE statement instead because it catch the cardinality errors.

    Why do you people say such insulting things? The are a ton of great programmers 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: grant EXECUTE to user on XP_CMDSHELL

    Apologies for being MIA. Work has been a bit lengthy lately.

    For my example code (which follows), the first thing you need to do is to setup a Windows user...

    --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: Is this a bug?

    CELKO (3/14/2012)


    This is a historical bug that goes back to the original Sybase days. Basically, the first versions of T-SQL was built on contiguous physical storage files and loops; not...

    --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: Is this a bug?

    terryshamir (3/14/2012)


    Thanks but I stil lthink its wrong/misleading and can hide errors.

    Heh... so can an improperly written join. It's the same as driving a car... if you don't pay...

    --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: Is this a bug?

    Nope... not a bug. The variable in example 1 will contain the last value produced by the query. Although not a good example of how to calculate a...

    --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: Parsing tab selimited text into SQL table

    opc.three (3/13/2012)


    Jeff Moden (3/13/2012)


    opc.three (3/13/2012)


    If you use SQL Agent, there is no need to introduce an additional programming domain into the call stack. Ditch xp_CmdShell and call bcp from a...

    --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: Parsing tab selimited text into SQL table

    opc.three (3/13/2012)


    If you use SQL Agent, there is no need to introduce an additional programming domain into the call stack. Ditch xp_CmdShell and call bcp from a step with type...

    --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 - 30,751 through 30,765 (of 59,101 total)