... does not a thread title make... was something as bad as "Sql WTF" to much effort? It's "too," not "to!" Honestly, galgorah, you're worse than btk. No he's not! -btk Hi guys. Cosy in here! Oh, I'm sorry for stepping on



  • ALTER FUNCTION [dbo].[fxGetFullField]
    (
    @name NVARCHAR(200),
    @type CHAR(2)
    )
    RETURNS NVARCHAR(255)
    AS BEGIN
    DECLARE @result VARCHAR(15)
    SET @result = @type
    IF ( @type = 'I' )
    SET @result = 'Int'
    IF ( @type = 'C' )
    SET @result = 'nvarchar(255)'
    IF ( @type = 'C4' )
    SET @result = 'nvarchar(255)'
    IF ( @type = 'R' )
    SET @result = 'float'

    RETURN 'MAX(CAST([' + @name + '] as ' + @result + ')) AS ' + @name
    END


  • Re: ...

    Well, let me be the first to thank you for the informative thread title. I haven't got a clue what the WTF is as you haven't made that entirely clear.



  • I did not think it was needed to explain the WTF in this little tsql function. Thought it was pretty easy to figure out what made me say the magic 3 words when i came across it



  • @coentje said:

    I did not think it was needed to explain the WTF in this little tsql function. Thought it was pretty easy to figure out what made me say the magic 3 words when i came across it

    Some explanation is usually appreciated, especially considering that nobody is fluent in every language or technology.  And your title is just shit.  I'm tempted to change it to "coentje rapes manatees" just to punish you.



  •  I don't appreciate the implication that raping manatees is a negative.



  • Re: ...

    The WTF is obviously that the SQL keywords are all in all-caps in the function itself, but the SQL clip it returns uses a lowercase "as".

    WTF! Coding style mis-match!!! HA HA that is hilarious.



  • @Smitty said:

     I don't appreciate the implication that raping manatees is a negative.

     

    What about "rapes manatees ineffectively"?



  •  @ComputerForumUser said:

    @Smitty said:

     I don't appreciate the implication that raping manatees is a negative.

     

    What about "rapes manatees ineffectively"?

    Would having a manatee fetish and dressing up like one make you a furry, even though manatees don't have fur? And if not, what would you be? A skinny? Blubbery? I think there's a significant gap in cultural terminology here.



  • @PeriSoft said:

     

    Would having a manatee fetish and dressing up like one make you a furry, even though manatees don't have fur? And if not, what would you be? A skinny? Blubbery? I think there's a significant gap in cultural terminology here.

    Yes, the gap in terminology is the real problem here... not the costumed freaks forcing themselves on unsuspecting sea mammals.


  • Re: ... does not a thread title make... was something as bad as "Sql WTF" to much effort? It's "too," not "to!" Honestly, galgorah, you're worse than btk. No he's not! -btk Hi guys. Cosy in here! Oh, I'm sorry for stepping

    @title said:


    ... does not a thread title make... was
    something as bad as "Sql WTF" to much effort? It's "too," not "to!"
    Honestly, galgorah, you're worse than btk. No he's not! -btk Hi guys.
    Cosy in here! Oh, I'm sorry for stepping on

    You fuckers.



  • @morbiuswilters said:

    ... does not a thread title make... was something as bad as "Sql WTF" to much effort? It's "too," not "to!" Honestly, galgorah, you're worse than btk. No he's not! -btk Hi guys. Cosy in here! Oh, I'm sorry for stepping on
     

    What is this I don't even

     

    @blakeyrat said:

    The WTF is obviously that the SQL keywords are all in all-caps in the function itself, but the SQL clip it returns uses a lowercase "as".

    WTF! Coding style mis-match!!! HA HA that is hilarious.

    (Repeating my joke so it doesn't get lost in the aquatic mammal rape.)

     



  •  @morbiuswilters said:

    You fuckers.

    There's a character limit there. It was suppose to be much longer, and contained a set-up for a dick joke that I hoped bstorer would finish.



  • @dhromed said:

     @morbiuswilters said:

    You fuckers.

    There's a character limit there. It was suppose to be much longer, and contained a set-up for a dick joke that I hoped bstorer would finish.

    I know a set-up for a joke dick: the palm of your hand.



  •  out of curiousity, what was the original title?



  • @tster said:

     out of curiousity, what was the original title?

    Presumably "...", both the current title and the replies allude to this.



  • @tster said:

     out of curiousity, what was the original title?
     

    Oh, it was nothing.



  • @ComputerForumUser said:

    @Smitty said:

     I don't appreciate the implication that raping manatees is a negative.

     

    What about "rapes manatees ineffectively"?

     

    Crikey!



  • @Flatline said:

    Well, let me be the first to thank you for the informative thread title. I haven't got a clue what the WTF is as you haven't made that entirely clear.
    I don't speak much sql either, but it's got to be some kind of godawful home-brewed attempt at implementing a variant or union data type in a database by keeping the damn thing in a text representation along with an associated tag to identify the variant type and then doing some hideous kind of dynamically evaluating a cast expression to return it in its real underlying type.  Eurgh!

     



  • @tster said:

    out of curiousity, what was the original title?

    "..."



  • Re: ... does not a thread title make... was something as bad as "Sql WTF" to much effort? It's "too," not "to!" Honestly, galgorah, you're worse than btk. No he's not! -btk Hi guys. Cosy in here! Oh, I'm sorry for stepping

    @coentje said:

    RETURN 'MAX(CAST([' + @name + '] as  ' + @result + ')) AS ' + @name

    Should be:

    RETURN 'MAX(CAST(' + QUOTENAME(@name) + ' AS ' + @result + ')) AS ' + QUOTENAME(@name);

    Also, it has float and not money? That is TRWTF.



  • @morbiuswilters said:

    @tster said:

    out of curiousity, what was the original title?

    "..."

    Oh, come on. Don't give us the silent treatment. Just tell us already!



  • @Anonymouse said:

    @morbiuswilters said:

    @tster said:

    out of curiousity, what was the original title?

    "..."

    Oh, come on. Don't give us the silent treatment. Just tell us already!

    I'm sorry but it appears you don't have the required security clearance required for that information...


  • @SlyEcho said:

    Also, it has float and not money? That is TRWTF.
     

    Without knowing the application, we can't be sure if they're abusing the "float" type by storing money values in it. They probably are, but... benefit of the doubt.


Log in to reply