Forum Replies Created

Viewing 15 posts - 17,911 through 17,925 (of 59,102 total)

  • RE: Splitting Strings in SQL Server 2016

    Sk1ppy (4/12/2016)


    Thanks; great post! I did have a question about the "failures" using CROSS APPLY vs OUTER APPLY though. Isn't that the expected behavior of using these functions? It seems...

    --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: Splitting Strings in SQL Server 2016

    LesterF (4/12/2016)


    Great comparison and test metrics. It's great to have off-the-shelf utilities like these.

    However, there is something I think it's worth sharing. Sometimes developers abuse split functions like these for...

    --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: Master.dbo.SysColumns

    cad.delworth (4/12/2016)


    Jeff: Thanks for the link(s). Still can't get my head around that "From TableA, TableB" syntax :sick:, so I'm afraid the other articles you linked to are near-impossible...

    --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: I need a strange join, please help

    GSquared (4/11/2016)


    If the business defines "closest in time" as what they want to match, then it's not wrong.

    I have to disagree with that in a lot of cases. 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: Master.dbo.SysColumns

    GilaMonster (4/12/2016)


    Jeff Moden (4/12/2016)


    John Mitchell-245523 (4/12/2016)


    It's the old-style join syntax. These two are equivalent:

    ...

    FROM TableA, TableB

    ...

    FROM TableA CROSS JOIN TableB

    ... as are these two:

    ...

    FROM TableA, TableB

    WHERE TableA.ID = TableB.ID

    ...

    FROM...

    --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: Master.dbo.SysColumns

    cad.delworth (4/12/2016)


    Well I never! I genuinely didn't know that.

    John: you're a star, and thanks.

    Clearly my SQL education has been so Prim and Proper that I have never ever been...

    --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: Master.dbo.SysColumns

    John Mitchell-245523 (4/12/2016)


    It's the old-style join syntax. These two are equivalent:

    ...

    FROM TableA, TableB

    ...

    FROM TableA CROSS JOIN TableB

    ... as are these two:

    ...

    FROM TableA, TableB

    WHERE TableA.ID = TableB.ID

    ...

    FROM TableA INNER JOIN...

    --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 Server diagram - table in other DB

    Thank YOU for the feedback on what you're doing. It's great to have some insight as to the needs of others.

    For what it's worth, I also sometimes run across...

    --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: I need a strange join, please help

    J Livingston SQL (4/11/2016)


    It would be appreciated if the OP can post some sample data etc.

    if there are millions of rows as suggested then it would be good to see...

    --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 Server diagram - table in other DB

    ttdeveloper (4/11/2016)


    Hey Jeff

    Thanks for this suggestion. I did consider using triggers across our databases but one reason has me worried about this.

    Performance. Our design essentially will be querying...

    --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: I need a strange join, please help

    Hugo Kornelis (4/10/2016)


    Without CREATE TABLE and INSERT statments I cannot test anything, but my gut feeling is that you will end up with a pattern somewhat like the below:

    SELECT List,...

    --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: Third Party Backup - Asigra - experience

    Ed Wagner (4/10/2016)


    I have no experience with Asigra at all, but I'm a fan of using native SQL backups. That's what we use and they haven't failed me yet.

    Ditto...

    --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: Code smells versus transgressions

    Heh... ok... I take it back. I was asked to troubleshoot some problems in some code I've never seen before and I now even hate XML used for configuration...

    --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: Calculate Age (in years)

    From the Article:


    See Comments in the code for more details.

    Awesome. I don't very often see such a useful bit of header information. You've provided a succinct yet accurate...

    --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: Restore help needed for 1.5 TB database.

    xsevensinzx (4/9/2016)


    jay81 (3/31/2016)


    Use Backup file Striping with the methods described in the below blog. I could reduce to backup times from few hours to with in an hour for large...

    --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 - 17,911 through 17,925 (of 59,102 total)