Forum Replies Created

Viewing 8 posts - 16 through 24 (of 24 total)

  • RE: Check the Variable is Empty or Null

    On tenuously related subjects (the use of 'elegant' code, implicit conversions and SARGable queries), one of my favorite bugs is the following code;

    SELECT ...

    FROM <Table 1> AS a WITH (nolock)...

  • RE: Check the Variable is Empty or Null

    Matt Miller (#4) (9/11/2014)


    Not that we need to reopen old wounds, but NULL isn't a value - it's a state representing the lack of a value. Thus it's not...

  • RE: Check the Variable is Empty or Null

    You have all been really helpful about this... I have had a few attempts at replying and trying to thank people for their input but my writing has been too...

  • RE: Check the Variable is Empty or Null

    DECLARE @TestVARCHAR(10)

    SET @Test = NULL

    IF @Test > ''

    PRINT '>'

    ELSE IF @Test = ''

    PRINT '='

    ELSE IF @Test < ''

    PRINT '<'

    ELSE

    PRINT 'Bloody NULLs'

    I get;

    Bloody NULLs

  • RE: Check the Variable is Empty or Null

    Alan.B (9/9/2014)


    IF @user > '' --This checks for not null and not empty

    Please don't do this... It's one of the things that drove me crazy with c programmers - the...

  • RE: sql formatting tool

    Grant Fritchey (9/4/2014)


    [SQL Prompt] does one heck of a lot more than just formatting. Download it & try it out. You can do that for free. Check out the snippets....

  • RE: sql formatting tool

    Grant Fritchey (2/11/2014)


    My personal favorite, and not just because I work for them, Red Gate SQL Prompt[/url]. It supports 2012 (and Azure and 2014).

    Sadly, at $350 per user, I don't...

  • RE: Sql agent job failure alert.

    I think I have a solution... I'll post it tomorrow.

Viewing 8 posts - 16 through 24 (of 24 total)