Conversion Fun

  • Bob Hovious (2/19/2009)


    Undocumented but useful: sp_MSGoBackInTime

    It's no longer undocumented.:cool:

    Tom Garth
    Vertical Solutions[/url]

    "There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
  • I'm just waiting for it to be listed in BOL. 😉

    __________________________________________________

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

  • Is there like a point to any of this ?

    Unless there is a darn good reason I cannot fathom, this kind of programming is to be condemned.

    Especially since even a beginner objects to setting a char to something that is obviously not a character.

  • Some of the questions of the day wind up being just trivia, not suggested best practices. But sometimes you stumble across some code that needs fixing and knowing about these kinds of bizarre behaviours just might give you a clue.

    __________________________________________________

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

  • OKay ...

    Yes I did learn something here, about a star symbol being entered by an implicit conversion. All the more reason to condemn "tricks" like assigning an integer to a char or varchar that is not long enough.

    The post is OK, on the caveat that instructions be added that anyone producing code like this needs to be identified, taken in the street and shot. And his house burned down. Preemptive strike to avoid the grief of being stuck later when the guilty party is out of reach.

  • J (3/11/2009)


    OKay ...

    Yes I did learn something here, about a star symbol being entered by an implicit conversion. All the more reason to condemn "tricks" like assigning an integer to a char or varchar that is not long enough.

    The post is OK, on the caveat that instructions be added that anyone producing code like this needs to be identified, taken in the street and shot. And his house burned down. Preemptive strike to avoid the grief of being stuck later when the guilty party is out of reach.

    [sarcasm] Think Green - if you're already going to burn down his house, save the bullet. Let's not be wasteful. Think of the street cleaners. [/sarcasm]

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

  • Not good enough.

    I want the satisfaction.

    In fact, a knife would be even more personal.

  • Holy crap, the Code Gestapo is going to make his rounds!

    I am removing all comments from any code that may point back to me. What do you think about that?

  • As long as there is going to be carnage, would you also add to the victims' list the names of those who say "Choose your answer", instead of "Choose all you think are correct?" 😛

    __________________________________________________

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

  • Ach soooo ...

    How about next time YOU have to debug SQL statments embedded in the application code. The genius could not code it like

    SELECT Customer_Name, Customer_Code, Customer_Alias FROM Customer

    Of course not. Since the application supports it, this brilliant coding was used:

    q.Fields[2], Fields[14], Fields[21]...

    That genius I would have gladly strangled.

    A honest mistake, I can accept. Hey I am still learning today that I was wrong about things I was certain of. Plus, I am ashamed of code I wrote only a few years ago.

    But poison code guaranteed to make soemone else's life miserable, NEVER.

    And suppressing comments, that is also high on my 5hit list.

    As for escaping, "I haff detailed files".

  • Bob Hovious (3/11/2009)


    As long as there is going to be carnage, would you also add to the victims' list the names of those who say "Choose your answer", instead of "Choose all you think are correct?" 😛

    Actually, more of a Darwin limitation (unfortunately void if they had time to reproduce).

    "Victims"? Hardly. Just a hit list.

    The President asked the CIE, the local police, and the FBR to find where whe wabbits live.

    The CIE consulted mineral and vegetal assets and concluded there was no such thing as a wabbit.

    The local police came back with a badly beaten bear which said OK, OK I'm a wabbit.

    The FBR torched all the forests it could find and said the wabbits had it comin'.

    It's been a long day today. I guess I am getting close to being reported.

    :ermm:

Viewing 11 posts - 16 through 25 (of 25 total)

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