Forum Replies Created

Viewing 15 posts - 18,721 through 18,735 (of 59,098 total)

  • RE: the use of CTEs

    Lynn Pettis (1/6/2016)


    Sergiy (1/6/2016)


    Lynn Pettis (1/6/2016)


    Unfortunately you failed to recreate the function as originally coded. You are relying on the existence of a tally table in the database. ...

    --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 use of CTEs

    Hugo Kornelis (1/6/2016)


    There is a good reason that standards exist, and that manufacturers confom to standards. Would you want to drive a car with the brake pedal on the right?

    "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: the use of CTEs

    Alan.B (1/6/2016)


    UPDATES based on a JOIN BTW are not standard.

    BWAAAA-HAAAAA!!! Sure they are. It's just that the rest of the world and the people that write the standards...

    --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 use of CTEs

    jaime.simancas 27970 (1/6/2016)


    ...is always better and faster, ...

    Oh... you said "always" and that's patently not true especially if you add resource usage into the equation. For example, do 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: the use of CTEs

    Hugo Kornelis (1/6/2016)


    A CTE allows you to define a complex subquery once and refer to it multiple times in the same query without repeating the code.

    That's the only benefit......

    --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 use of CTEs

    Jason A. Long (12/24/2015)


    Unless you're using recursion, a CTE can be rewritten as a derived table... Considering that derived tables (and CTEs) are processed before the outer query, CTEs can...

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

    SQLRNNR (1/6/2016)


    Jeff Moden (12/29/2015)


    Grant Fritchey (12/29/2015)


    That picture has always struck me... it's either a picture of Grant's back yard when he's BBQ'ing or a picture of Detroit on a bad...

    --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: Averages over 28 days instead of a month

    Raastarr (1/6/2016)


    Jeff Moden (1/5/2016)


    Raastarr (1/4/2016)


    Thanks for all of the responses.

    I've gone with the first solution from Eirikur as [font="Arial Black"]it did exactly what was required [/font]:-).

    Careful now... Does 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?

    Brandie Tarvin (1/6/2016)


    djj (1/5/2016)


    SQLBill (1/5/2016)


    If I hear of any openings anywhere that allow full work from home, I'll pass them your way.

    -SQLBill

    There all over the internet.:-P And I have...

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

    Alan.B (1/5/2016)


    SQLBill (1/5/2016)


    Lynn Pettis (1/4/2016)


    SQLBill (1/4/2016)


    Lynn Pettis (1/4/2016)


    SQLBill (1/4/2016)


    I stayed up way longer than normal during the holiday break, but I forced myself to get in the bed (and sleep)...

    --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: Store "Dynamic" results from a stored procedure into a table

    roger.plowman (1/6/2016)


    If it's just the thought of writing 30-40 SPs that gives you pause, you can always write a program that writes the code for you. I did this 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: Another Recursive Hierarchy bit of help needed...

    Jeff Moden (1/6/2016)


    simon_s (1/6/2016)


    Hi Jeff

    could you elaborate please ? what sort of thing am I looking for ?

    thanks simon

    It's a loop in the hierarchical chain. For example...

    Q...

    --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: Another Recursive Hierarchy bit of help needed...

    simon_s (1/6/2016)


    Hi Jeff

    could you elaborate please ? what sort of thing am I looking for ?

    thanks simon

    It's a loop in the hierarchical chain. For example...

    Q Y W...

    --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: Header and Detail Data

    bpowers (1/5/2016)


    We received verification that the data can be submitted with all the Header data then the Detail data, as such:

    Header 06721

    Header 05482

    Header 04263

    Detail 06721

    Detail 05482

    Detail 05482

    Detail 04263

    Etc...

    Not sure if...

    --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: Store "Dynamic" results from a stored procedure into a table

    It's difficult for me to understand why anyone is even entertaining the idea of a universal query, never mind doing it with XML that still needs to be parsed.

    --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 - 18,721 through 18,735 (of 59,098 total)