Forum Replies Created

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

  • RE: Alias Usage

    With 3 correct choices out of 4, I'd phrase it "Which statement would NOT run correctly" and dispense with multiple choices. /nitpick

    An easy question. I always use AS when I...

  • RE: Deterministic

    Koen Verbeeck (3/22/2013)


    So a part of the correct answer is "all styles below 100" are non-deterministic, but another answer is "not 20,21", because they are deterministic...

    Well, the question was which...

  • RE: Display two fields of two UNRELATED tables WITHOUT crossjoin

    Well, if ALL you want is the two counts, why not do this?

    select

    Count1 = (select COUNT(*) from #Table1),

    Count2 = (select COUNT(*) from #Table2)

  • RE: Type conversions and Nulls

    Well, the good news is, I got NULLs down pat. The less good news is, I didn't even stop to think about type precedence.

    Conclusion - time for more coffee.

  • RE: BIT Primary Key

    Nice easy question, with a bonus discussion about one-row tables. 🙂

    On the second thought, the table in the question allows 0 or 1 rows, while Hugo's example ensures that the...

  • RE: Defaults

    Nice and easy afternoon question, here. 🙂

  • RE: SELECT

    Right, poster #627 to complain about the wording. With the little twist that I stared at it, thought I spotted the gotcha and said, "Aha! The batch returns an error,...

  • RE: GO Part 1

    The benefit of replying a few days later and fully caffeinated. 😀

    Even so, I almost missed the INSERT ... SELECT part. :hehe:

    Fun question, and yes, a helpful technique for populating...

  • RE: APPLY - 1

    Narud (9/6/2012)


    Hugo Kornelis (9/6/2012)


    Narud (9/6/2012)


    I think that is because CROSS APPLY is more like not use explicit joins, as in SQL ANSI '92.

    I'd put it differently. The only difference between...

  • RE: NULL

    SQL Kiwi


    It drives me nuts to see column definitions without a NULL or NOT NULL constraint.

    +1

    g_one_2020


    As per the post, NULL may be NOT EQUAL to 2, so we should get...

  • RE: Calculating percentages of total

    Well, sheesh, way to make it simple! I was having such fun with my pivots! 😀

    Thanks, Luis.

  • RE: Transactions 4

    Mike Dougherty


    Under what conditions is it acceptable to attempt an insert but not care whether it happens?

    I was wondering the same thing.

    BOL says:

    Specifies the error response when an insert operation...

  • RE: What is the logical Processing order of select statement

    The question was quick and easy. It's the last line in the explanation, about alias column names in WHERE that made me go, "Oh!" One of those things I knew,...

  • RE: Use of BETWEEN and DATETIME

    I spotted the gotcha, and got it right. I do think it would have been a more educational question if it focused just on the date and time element, without...

  • RE: Unary & Aliases

    Carlo - absolutely that is confusing. When I intend to alias the column, I prefer to use [ColumnName] = col1 syntax, which aligns all my column names nicely.

    The problem...

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