Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • RE: Who Likes NULL?

    I like NULL because it enables a limited, trinary condition.  Suppose the acceptable values for a column are TRUE or FALSE.  Enabling NULL for that column enables three conditions:  TRUE, FALSE,...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Uppercase vs. lowercase for keywords

    P.S. I've been writing code of one kind or another since 1965, and I missed the closing parenthesis in my post, above, truly by accident. Color might have...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Uppercase vs. lowercase for keywords

    And besides all that, upper case letters take more ink. Pretty soon your screen is bound to run out of it. Then where will you be?

    Seriously, legibility is...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Selecting from hierarchies like Managers and Employees

    Jeff, Kevin, tmarkham et. al.,

    Nice job! I'm truly impressed.

    I'm a long time believer in the value of peer review. Just look at what came of this discussion.

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Selecting from hierarchies like Managers and Employees

    Just for the record, I *LIKE* recursive code. I've written a lot of recursive code in various languages over the years, as well as reusable and reenterable code.

    I do...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Selecting from hierarchies like Managers and Employees

    Dave Brooking (5/3/2012)


    I'd be interested in knowing which version(s) of SQL Server Chuck is using/supporting.

    2000, 2005, and 2008.

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Selecting from hierarchies like Managers and Employees

    Isn't this same function much easier to realise with an rCTE?

    Thank you Miika.

    I think the choice of approach must depend upon the environment. For a shop whose TSQL writers...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Demystifying the use of CASE in an ORDER BY statement

    You would still need one CASE statement for the ASC sort, and one for the DESC sort for a particular column.

    You could use those same two CASE statements to sort...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: TSQL TestBits function for rapidly testing multiple switch settings

    There are FOUR spams, all worded the same.

    1282864, 1282865, 1282866

    1282868

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Multiple results

    I agree with Jack.

    It happens that most of my applications are written in ColdFusion. Each language would be different but you can get the idea from the following ColdFusion...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Multiple results

    Absolutely.

    The following TSQL will produce two output sets.

    If you put this TSQL into a stored procedure the application software you use should be able to select which output set you...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Query to pull different grade level students

    I would put your choices into a second table. This second table could be a temporary table or a table variable.

    I agree that you should have provided the table...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: Alternate to context based search

    You could use CASE statements in the proc because you were only using the IF statments to select the column. This might make it a little easier to maintain...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: TSQL TestBits function for rapidly testing multiple switch settings

    Thanks for your post, Andy. I think yours is a nice, clean approach too. You're right, I didn't need the zeroes when initializing the masks. The zeroes...

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

  • RE: TSQL TestBits function for rapidly testing multiple switch settings

    Thank you, Jeff. I appreciate it.

    Chuck Hoffman
    ------------
    I'm not sure why we're here, but I am sure that while
    we're here we're supposed to help each other
    ------------

Viewing 15 posts - 1 through 15 (of 16 total)