How about a Stairway to CLR series

  • Hi,

    I've enjoyed several of the Stairway series to date. I'm just wondering if you could provide one on creating CLR stored procs and UDFs?

    Nick

  • nick.gekas (4/2/2013)


    Hi,

    I've enjoyed several of the Stairway series to date. I'm just wondering if you could provide one on creating CLR stored procs and UDFs?

    Nick

    +1 Absolutely! I second your suggestion.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • It would be great to at least cover the basics.

    It seems important to be prepared if MS ever discontinues the extended procedures.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • +1 😀

  • First, let me state flatout that I'm NOT an anti-CLR zealot. I'm also NOT an anti-Cursor zealot. They both have their places and their uses.

    Much like the use of Cursors, though, I've seen some pretty bad misuse of SQLCLR. I've seen people write a CLR to do a Modulus function because they didn't know enough about T-SQL to realize what the "%" operator was. I've seen people write random number generators that took a lot longer than the old hack of ABS(CHECKSUM(NEWID())). And, I even had one fellow write a CLR to do an "UPSERT" because he didn't know T-SQL well enough to do it there.

    By the same token, I've seen some wonderful uses of SQLCLR such as some very high performance and flexible character based splitters, a "Tally Table" CLR, a much better and more flexible "Pivot", and some remarkable stuff that Adam Machanic has done.

    To wit, if someone actually does write a "Stairway" for SQLCLR, I'd really like to see some important research and explanations as to what is appropriate for SQLCLR and what is not. Just like Cursors, SQLCLR should not be used as a comfort zone replacement for more appropriate T-SQL or SQL Server knowledge.

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

  • In process. I hope to have #1 out in the next month.

  • As requested:

    Stairway to SQLCLR Level 1: What is SQLCLR?[/url]

    🙂

    Take care,

    Solomon...

    SQL#https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
    Sql Quantum Lifthttps://SqlQuantumLift.com/ ( company )
    Sql Quantum Leaphttps://SqlQuantumLeap.com/ ( blog )
    Info sitesCollations     •     Module Signing     •     SQLCLR

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply