Forum Replies Created

Viewing 15 posts - 256 through 270 (of 429 total)

  • RE: Update with CASE statement

    Andrew Diniz (2/19/2013)


    Carlo Romagnano (2/19/2013)


    The update may fails with error, if the default collation is case sensitive.

    UPDATE GenderUpdate

    SET Gender = CASE WHEN GENDER = 'M' then 'F' ELSE 'M'...

  • RE: Update with CASE statement

    Andre Ranieri (2/19/2013)


    Since statement #4 either works OR it doesn't, a false answer would be impossible.

    That's just my boolean mind at work.

    Thanks for the question, and the nice use of...

  • RE: Alter User

    Wow, interesting... and very odd.

    I'd be curious to know the reason behind this restriction.

  • RE: Updating a table using the results of a CTE

    Unless I'm missing something, you would update it the same way you would if it were a physical table:

    with SimpleUpdate as (Select Source, Sink, MovingAverage From TestNode)

    UPDATE A

    SET A.MovingAverage= B.MovingAverageResult

    FROM...

  • RE: Merge

    Ugh, apparently I really need to use MERGE more often.

    Thanks for the great question!

  • RE: The Lonely and Neglected Cartesian Product (Cross Join)

    Nice question! Glad to see one involving cross joins.

    archie flockhart (2/12/2013)


    I selected "none of these are correct".

    The first two are wrong for the reasons stated in the answer.

    The third...

  • RE: Creating Tables

    (Bob Brown) (2/11/2013)


    Sean Lange (2/11/2013)


    Here is the original code with the GOs commented out so it will be a single batch.

    But the GOs are there.

    Even if you ignore...

  • RE: Creating Tables

    I got lucky in guessing that the intent of the question was to show that you can't use INTO with an existing table, and that the answer really meant statements...

  • RE: Thesaurus Files

    Nice question!

    Full text indexing isn't something I use... had to do a bit of research on this one.

    Based on what I read, it looks like even if you had removed...

  • RE: Updating Views

    Good question!

    I wondered about an ALTER VIEW statement being there as well since altering the view inherently refreshes it, but then recalled that *'s aren't allowed in schema-bound objects. ...

  • RE: Type conversions and Nulls

    Great question, thanks Tom!

  • RE: Oops! SQL column swap or SQL column clobber?

    Good question, as this seems to be very confusing for people with a programming background that start working with SQL.

  • RE: Data compression

    Nice question. I'm surprised more people haven't gotten it correct, as it wasn't too hard to verify.

  • RE: BIT Primary Key

    Nice creative question.

    I think that is the first time I've seen a bit column used as a primary key.

  • RE: Relational Model versus XML

    sipas (1/25/2013)

    Which is why you don't make the decision based on that one sentence - therefore 'either' is the correct answer.

    There is not enough information to know if either model...

Viewing 15 posts - 256 through 270 (of 429 total)