Forum Replies Created

Viewing 15 posts - 286 through 300 (of 812 total)

  • RE: IMPLICIT_TRANSACTIONS vs BEGIN TRAN

    TomThomson (1/19/2015)


    Nice question.

    But I don't like the last sentence of the explanation

    Transaction started by "BEGIN TRAN" may end prematurely and unexpected by some errors that may ROLLBACK transaction....

  • RE: IMPLICIT_TRANSACTIONS vs BEGIN TRAN

    edwardwill (1/19/2015)


    I would have found this easier if there had actually been a question.

    That's true!

    The question is "select six TRUE answer". It's "implicit".

    🙂

  • RE: IMPLICIT_TRANSACTIONS & BEGIN TRAN

    richxs (1/12/2015)


    Interesting, if I run this in SQL Management Studio I get 0,0,2,2,1

    but if I run it from TOAD for SQL Server I get 2,2,3,3,2

    From BOL:

    Implicit transactions may unexpectedly be...

  • RE: IMPLICIT_TRANSACTIONS & BEGIN TRAN

    TomThomson (1/10/2015)


    Nice question.

    I think that having BEGIN TRANSACTION increment trancount by 2 instead of 1 is utterly silly. It's a really nasty trap that can cause pointless and damaging...

  • RE: Error messages

    Another bad worded qotd:

    My result.

    Msg 515, Level 16, State 2, Line 7

    Impossibile inserire il valore NULL nella colonna 'b' della tabella 'tempdb.dbo.#a__________________________________________________________________________________________________________________000000000211'. La colonna non ammette valori Null. INSERT avrà...

  • RE: NULL Aggregates

    Rune Bivrin (1/7/2015)


    Not fond of this question.

    COUNT(*) counts NULL:s, but COUNT(<expression>) doesn't.

    select count(*), count(a)

    from (values (1), (NULL)) x(a)

    And GROUPING most certainly considers NULL:s.

    +1

    🙂

  • RE: Problems with partitioned views

    alter TABLE dbo.ActualOrders

    with nocheck

    add constraint o check(OrderDate between '20140101' and '20141231')

    alter TABLE dbo.HistoryOrders

    with nocheck

    add constraint oo check(OrderDate between '20100101' and '20131231')

    In this case the check is added, the optimizer...

  • RE: Problems with partitioned views

    Bob Cullen-434885 (1/6/2015)


    Great question! Like the previous poster, I also have the potential to use this scenario, as we are keeping way too many records in our "live" tables, but...

  • RE: Create Table FAILED!?

    patricklambin (12/30/2014)


    As I have installed only SQL Server 2012 and 2014 instances , I am obtaining only the following message

    Warning! The maximum key length is 900 bytes. The index 'PK__QoTD__2CB664DD844B62FA'...

  • RE: Create Table FAILED!?

    I googled "Msg 2714" and answered correctly.

  • RE: Linked lists

    Another solution is adding a xml column to the PlayList table and add the execution order there. So, it's just ONE update on ONE column.

  • RE: Linked lists

    natalie.ignatieva (12/21/2014)


    This is a great solution, linked list idea adds complexity though. You can easily change the way you rank your songs and make Position column as float. Then you...

  • RE: I have no id

    It might be better to use JOINS, but that is a different question.

    I disagree! JOINS are different than IN or EXISTS in the WHERE clause.

    JOINS multiply the number of...

  • RE: NO COUNT

    Extremely easy!

    The answer is in the title!

    😀

  • RE: EXECUTE

    Bello!

Viewing 15 posts - 286 through 300 (of 812 total)