• temp table (unregistered)

    Just a temporary frist

  • (nodebb)

    The drop table statements are convenient when running the body of the procedure directly (not by calling the sproc), for debugging or new development. In that case, temp tables persist as long as your SSMS tab is open/connected, so you can't re-run the script multiple times without dropping the tables.

    My personal preference, assuming a SQL Server version that supports the syntax, is to drop table #foo if exists at the start of the sproc, and ideally to remember to put the drop table statements in a comment block before actually creating/altering the sproc.

  • Argle (unregistered)

    My eyes glaze over when it comes to good SQL, so I wound up fixating on "munge" in the article. Since my first text editor was TECO (which speaks to both my age and geekiness) I'm wanting desperately to scratch that "e" off the end of the word. Am I the only one to think that the code was "munging" the data, not "mungeing" it? (Curiously, dictionaries I checked say that "mungeing" is valid, but my browser's spell checker only says "munging" is correct.)

  • Randal L. Schwartz (google) in reply to Argle

    Hail TECO! I buit a screen-based custom visual editor with that.

    And every good TECO hacker knows what their name does when typed at a command prompt.

  • Ryan (unregistered)

    TRWTF is the incorrect code highlighting. TDWTF is treating # as a comment marker.

  • Mike (unregistered)

    Let's not forget the error handling. Since @@Error evaluates the statement immediately preceding it, the Select @@Error as ErrorNumber will always return 0 (assuming the begin after the if doesn't fail

  • (nodebb)

    and don't we love using a function on a column in order to use it in WHERE

  • Barf4Eva (unregistered)

    heh, can't really follow this nor the article that well. About as clear as mud what the volume of data is in the XML before one can even make any assumptions about transaction handling, or perhaps more importantly, the number of rows in scope of the of transaction here. Obviously if the other devs came up with a simple solution, perhaps this person's comments and directives were simply an uneducated freak-out by a clueless person? Again, hard to say without knowing the picture of the data involved. But I'd definitely ding this code for looking like crap and having some nonsensical comments that are likely a red herring.

Leave a comment on “Just A Temporary Thing”

Log In or post as a guest

Replying to comment #537946:

« Return to Article