Forum Replies Created

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

  • RE: Variable Declaration

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


    good question, thanks.

    bclavier (9/19/2013)


    SQL server 2005

    Msg 139, Level 15, State 1, Line 0

    Cannot assign a default value to a local variable.

    <snip>

    this will be expected pre SQL2008. for...

  • RE: Variable Declaration

    Interesting.

    I failed because I didn't remember the discussion about the QOTD from the other day. There it were made abundantly clear that the declaration and assignment were made in two...

  • RE: CASE vagaries

    Hugo Kornelis (9/7/2013)


    <the truth>

    +1

    Also: I didn't have any trouble ending up with NULL in @X. As Hugo states, but in other words:

    If you set a variable, you have to...

  • RE: Delete v Truncate

    Nadrek (3/21/2013)


    I also had to think about DML vs. DDL, because TRUNCATE is more or less equivalent to:

    DELETE FROM + Reset Identity

    and

    DROP TABLE(etc.) + CREATE TABLE(etc.)

    For me, the clincher was...

  • RE: Number of Rows

    Dave62 (1/19/2013)


    <snip>

    Here is the exact text. "How many row(s) are affected by the following code in the estimated execution plan?"

    As you can see, the estimated execution plan is clearly stated....

  • RE: SubQuery

    Hugo Kornelis (1/11/2013)


    I don't really agree with the answer marked as correct.

    <snip the arguments for brevity>

    +1

    I have gotten used to the OUTER JOIN version myself, and for much the same...

  • RE: SQL JOINS

    I concur with many here. It were somewhat of a disappointment to end up with some alias-stuff after spending quite some time looking for the column not being aggregated, or,...

  • RE: SET Options - 1

    Argh!

    I did read the docs, but I got too focused on the index creation itself, which will fail if numeric_roundabort is on, but the info on update/insert etc. didn't really...

  • RE: SQL

    Hmm, are the conditions correct?

    The statements were:

    Can’t update secondary table’s foreign key if there is no related row in primary table.

    Hmm, the reference material states that I can NOT update...

  • RE: Queries

    I agree with Koen. Those are statements. As the estimated execution plan doesn't know better it will divide this up into 8 parts. Why the quoted_identifier setting always will go...

  • RE: Noise

    kapil190588 (10/15/2012)


    As sql server version was not specified so I selected NoiseList but got wrong...

    I think version should be mentioned in question..

    learn new thing today.......

    Although getting it right, I concur...

  • RE: GO Part 1

    Damn!

    Got the go part right, but didn't read the select closely enough.

    But good to remember this way to create an exponentially rising number of records in a hurry.

    Thank you for...

  • RE: GO Part 2

    Bronzo (9/13/2012)What I found most interesting is in SSMS the change to the batch seperator option is not picked up immediately by your open windows. You actually need to open...

  • RE: Snapshots

    Argh!.

    Returning to some old questions, I thought I would just check out this one.

    I were hazy on what I could do with snapshots, so I ended up on the referenced...

  • RE: Working on stored procedures

    Nice question. Thanks.

    I have in fact been bitten by this behaviour on occasion, so I could recognize the pattern of possibilities.

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