Forum Replies Created

Viewing 15 posts - 31 through 45 (of 83 total)

  • RE: Assigning categories to values 1

    L' Eomot Inversé (5/17/2013)


    You are demonstrating a lack of historical knowledge here.

    SQL became "SQL" because someone other than IBM owned the rights to the original name the IBM developers who...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Assigning categories to values 1

    Hugo Kornelis (5/15/2013)


    (and if you go out in the street and ask people if -5 is between -1 and -10, I'm willing to bet that 99% of all people will...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Assigning categories to values 1

    Cliff Jones (5/14/2013)


    Nice question. This falls into that category where if you inadvertently did this in a real piece of production code, you would probably stare at it for...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Assigning categories to values 1

    declare @test int

    set @test=-2

    select case when @test between -1 and -10 then 'Order does not matter'

    else 'Order matters' end as Conclusion

    It would seem to me that order shouldn't matter....


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: The Subquery

    Stewart "Arturius" Campbell (5/9/2013)


    God question, thanks - one of the reasons why i prefer to use JOINs over subqueries.

    The downside to joins is that they can permit duplication if referential...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Table Alias

    Hugo Kornelis (5/2/2013)


    Rune Bivrin (5/2/2013)


    Not necessarily true. If your development server is case sensitive you run the risk of having more than one object with the same name, only with...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Table Variable

    Good to know before trying to use conditional declarations.


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Create Table

    I was initially leaning toward the right answer for the right reason, then talked myself out of it, thinking that SQL Server would be able to handle it. :hehe:

    Of course,...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: FK to IDENTITY

    I too got it right for the wrong reason, thinking the second insert was the one that succeeded.


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: COUNT() Function

    Dineshbabu (4/18/2013)


    Nice question..

    Somebody tell me what does that ALL mean in a select statement (4th option)..

    I had been nervous about that keyword too. It is apparently the default, and...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: COUNT() Function

    Dineshbabu (4/18/2013)


    Is there anyway to make COUNT() to consider even NULL values?? I mean any set options or something like that?

    To get count() to include null values, you can simply...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: SQL JOINS

    Sean Lange (4/15/2013)


    An interesting question. The duplicate ID's was certainly a nasty distraction. I managed to notice the ID issue but wonder what this question was really trying to test/teach....


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Help on how to count guests in hotel every day

    I get the same results both ways, even for days with no guests of one gender or no guests at all.

    CREATE TABLE #Guests (checkin date, checkout date, FullName varchar(50), Gender...


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Help on how to count guests in hotel every day

    I would ordinarily add an "Else 0" prior to the End in those case statements rather than the isnull function. Is there a performance difference, or just personal preference?


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

  • RE: Challenge Yourself

    I am curious on the rule against temp tables. Is that in preference for work tables?


    Puto me cogitare, ergo puto me esse.
    I think that I think, therefore I think that I am.

Viewing 15 posts - 31 through 45 (of 83 total)