T-SQL 2005 Help

  • It's so odd to hear everyone talking about getting "better" and not programming like they were in the '60's or '70's anymore. I wonder what people would say if I told them that most of my set based programming skills are a direct result of doing punched wire boards in the '60's and hand assembled machine language in the '70's. And, I wonder how many know that the Tally table is a product of the '70's. I wonder how many would scoff at the idea that my joins and a lot of the speed I get out of code is based on the fact that main frame hard disks couldn't handle much nor very quickly and that all the techniques I use for reducing the amount of data being handled for the sake of performance comes directly from those old restrictions. I also wonder how many actually know that avoiding GOTO has not only been a goal since the '60's, but also has been possible since then, as well.

    Don't be so quick to discard the methods developed so long ago. It's kind of like Calculus... they did most of it right more than mere decades ago.

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

  • I am not disregarding the foundation. If I have made that impression, I apologize. I am merely debating the comment that GOTO should never be used.

  • Understood... I used to say "Never" use a cursor. Don't get me wrong, I always try to avoid it and have been very successful at doing so. But, just like the cursor, GOTO is a tool. I definitely agree that it has been horribly abused and should be avoided with even more vigor than avoiding a cursor. Still, there will always be some exception even if we don't yet know what it is.

    Heh... wouldn't it be a riot if a well constructed IF/GOTO combination turned out to be faster than IF/ELSE or if IF/ELSE actually resolved as nothing more than an IF/GOTO?

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

  • LOL. You all make my day sane if there is a such thing as "sane". http://forums.pentaho.org/showthread.php?t=68857

  • Jeff Moden (4/12/2009)


    ...That brings me to another subject... I hate deprecation. Who is it to say that certain features are no longer useful? The masses? BWAA-HAAA-HAAA!!! 😛

    Even for ANSI_PADDING Jeff? 😀

    As far as GOTO is concerned, the only arguably 'good' uses of it that spring to mind are:

    1. To exit a deeply nested structure quickly

    2. To ensure there is only one exit point from a program

    I can't remember the last time I used GOTO, and I guess that's the beauty of it: one can choose to ignore it completely if it doesn't appeal.

    GOTO probably gets a bad press because of the 'spaghetti code' examples everyone is familiar with. Spaghetti is not an inevitable consequence of using GOTO of course - all things in moderation 😉

    Paul

  • Paul White (4/12/2009)


    Jeff Moden (4/12/2009)


    ...That brings me to another subject... I hate deprecation. Who is it to say that certain features are no longer useful? The masses? BWAA-HAAA-HAAA!!! 😛

    Even for ANSI_PADDING Jeff? 😀

    Heh... even ANSI_PADDING. Can't think of a quicker, easier way to make fixed field format files.

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

  • While I never wired boards, Jeff, I did start out with 80 column cards and 7mb of disk and time to have lunch while the code compiled. Here's a recent story to make the old-schoolers smile. Last Friday I had a DBA call me to talk about a problem with a download he was trying to import. He couldn't find or figure out the delimiters. One glance told me that it was... you guessed it... a fixed length file.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • ...and hand assembled machine language...

    Me too but coded and written directly in hex :blink:

    I did start out with 80 column cards

    Did my first programs on punched card with a hand punch, got quite proficient at it. All those lost arts eh! 😀

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 8 posts - 31 through 37 (of 37 total)

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