Discourse Annoyances

Presume you mean my reply in that thread?

It looks OK to me, but perhaps I'm missing something?

Here's the exact content of my post


    [quote="gbritton, post:2, topic:3164"]
    SPACE(any length) = ''
    [/quote]
    
    I know that .. in fact I've known that since I was in short trousers ... :smile:
    
    So  WHY oh WHY oh WHY have I been writing this ALL THESE YEARS? :frowning: in order to convert a parameter from "blank" to "null"
    ```sql
    SELECT @MyParameter = NullIf(RTrim(@MyParameter), '')
    ```
    when quite clearly this would work just fine
    ```sql
    SELECT @MyParameter = NullIf(@MyParameter, '')
    ```
    How many RTrims have I typed unnecessarily? :frowning: :frowning: :frowning:
    
    One thing is for sure ... I'm not going to do it again!!

and here it is repeated so that it "formats"


I know that .. in fact I've known that since I was in short trousers ... :smile:

So WHY oh WHY oh WHY have I been writing this ALL THESE YEARS? :frowning: in order to convert a parameter from "blank" to "null"

SELECT @MyParameter = NullIf(RTrim(@MyParameter), '')

when quite clearly this would work just fine

SELECT @MyParameter = NullIf(@MyParameter, '')

How many RTrims have I typed unnecessarily? :frowning: :frowning: :frowning:

One thing is for sure ... I'm not going to do it again!!