Forum Replies Created

Viewing 15 posts - 8,026 through 8,040 (of 8,416 total)

  • RE: Concurrency Question

    Lynn,

    Don't get me wrong - I am sure that the NOT EXISTS solution is fine for all general purposes, and it is very similar to the approach I would take.

    Nevertheless,...

  • RE: Concurrency Question

    Apologies if I am spamming here :hehe:

    Lynn, yes Jamie did mention SERIALIZABLE - but he said he had looked at it and didn't think it met his requirements (:confused:)

    Paul

  • RE: Concurrency Question

    Steve Jones - Editor (5/8/2009)


    Paul, nice test. I was wondering if that was a hole, and you've shown it.

    I still think the best thing is to run the insert, then...

  • RE: Concurrency Question

    Lynn Pettis (5/8/2009)


    I'll accept the devils advocate position. But, can you make it fail when the optimistic concurrency features are not in use.

    At this point, we actually don't know...

  • RE: SET vs SELECT

    As an aside, and for general amusement rather than as a serious proposal, note that the following will ensure that an error is raised if you try to assign more...

  • RE: Concurrency Question

    Bob Hovious (5/7/2009)


    Jamie, are you thinking that you have to somehow code the locks yourself?

    Jamie,

    At the same time as *not* necessarily recommending this as a solution in this case, there...

  • RE: Concurrency Question

    For clarity, note that Bob's example also fails if READ_COMMITTED_SNAPSHOT is on.

  • RE: Concurrency Question

    Florian Reischl (5/6/2009)


    Hi

    What about just a simple INSERT SELECT WHERE:

    INSERT INTO dbo.Users

    SELECT @UserId

    WHERE NOT EXISTS (SELECT TOP(1) 1 FROM dbo.Users WHERE Id = @UserId)

    Bob, Lynn, Flo, Steve and Bruce:

    {warning, devil's...

  • RE: SET vs SELECT

    FWIW, I tend to use SELECT the vast majority of the time.

    It's more a question of style than substance.

    Go with whatever makes you happiest.

    Paul

  • RE: Column values disappear after adding ORDER BY clause

    It will be easier to show you what is happening, if you can provide the CREATE TABLE statements for each of the tables you reference.

    The data for the tables isn't...

  • RE: Lazy Writer

    Ratheesh.K.Nair (5/7/2009)


    What is Lazy writer?

    The author of a lazy post...?

    :laugh:

    Paul

  • RE: Week Commencing Count

    So much for me leaving it as an exercise for the OP then!

  • RE: Are the posted questions getting worse?

    Lynn Pettis (5/5/2009)


    Then you have those that would bite the hand that is trying to feed them.

    Are you sure he was shouting deliberately?

    His posts seemed quite amiable up to that...

  • RE: Transaction Log grows to much / Recovery Model Simple

    That link is for SQL 2008, this is the 2005 one:

    http://msdn.microsoft.com/en-us/library/ms190422(SQL.90).aspx

    INSERT...SELECT can be minimally logged in 2008 only - and only if the table is a heap (no clustered index).

    Paul

  • RE: Transaction Log grows to much / Recovery Model Simple

    tobe_ha (5/5/2009)


    INSERT INTO...SELECT into a table with a clustered index can still be minimally logged, unless it contained rows before the INSERT, in which case it will be fully logged...

Viewing 15 posts - 8,026 through 8,040 (of 8,416 total)