Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 1,957 total)

  • RE: TRigger problem, again Multible rows with update

    Jeff Moden (5/22/2011)


    Wayne is absolutely spot on about the possible performance problem associated with joined UPDATEs. The "target" of the UPDATE MUST be somewhere in the FROM clause (I...

  • RE: TRigger problem, again Multible rows with update

    You are nearly there, but you need to think in terms of sets of data, rather than individual rows.

    UPDATE [dbo].[bokningar]

    SET

    [dbo].[bokningar].[Webbokningsnr] = ISNULL(D.Webbokningsnr,I.Webbokningsnr)

    FROM

    deleted D

    JOIN

    ...

  • RE: CTE- Where are they stored?

    Nils Gustav Stråbø (5/20/2011)


    Function, procedure, view definitions etc are stored in the database where they are created. This definition is stored on disk, guaranteed.

    A CTE declared inside a stored procedure...

  • RE: Rounding numbers

    sperry-750868 (5/20/2011)


    Do with it as you wish. 🙂

    I do not have to deal with negative numbers but it is not to hard to explain, what changes would i have to...

  • RE: Rounding numbers

    sperry-750868 (5/20/2011)


    Mister.magoo, You sir are a beautiful human being. Need to run a few more tests but it all looks good. Thanks a lot!

    Gosh! maybe I should put that in...

  • RE: Rounding numbers

    sperry-750868 (5/20/2011)


    SELECT ROUND(16499.00,0-LOG10(1000))

    So its

    SELECT ROUND(Result,0-LOG10(RoundingNumber))

    IS that correct?

    Thanks for all your help

    Yes, that's right - do you have to handle negatives? If so, it is slightly different because of...

  • RE: Rounding numbers

    Sorry, found my mistake

    SELECT ROUND(16499.00,0-LOG10(1000))

  • RE: Rounding numbers

    EDIT: mistake in code see next post

  • RE: CTE- Where are they stored?

    sqldba_icon (5/20/2011)


    Can someone please tell me where is a CTE stored when declared or used inside a proc? Is it stored in memory or hard disk?

    I want to be first...

  • RE: Rounding numbers

    cast the result and the rounding value as integers, then divide, then multiply.

  • RE: Concurrency

    SQLRO (5/20/2011)


    SELECT TOP 10 Col1,Col2,Col3

    FROM myTable WITH(READPAST)

    WHERE Col1='XYZ'

    AND Col2='ABC'

    I believe this will get you ten records that are not locked for update.

    Can I lock the records / rows...

  • RE: Concurrency

    SELECT TOP 10 Col1,Col2,Col3

    FROM myTable WITH(READPAST)

    WHERE Col1='XYZ'

    AND Col2='ABC'

    I believe this will get you ten records that are not locked for update.

  • RE: Changed Server Windows name and now seeing different names using various sql queries

    Have you restarted SQL Server Service since the sp_addserver?

  • RE: Order varchar numericly

    Ninja's_RGR'us (5/19/2011)


    Any special way to make your trick work when there are negatives numbers too?

    Never tried it - can't think of one off the top of my head!

  • RE: Are the posted questions getting worse?

    jcrawf02 (5/19/2011)


    mister.magoo (5/19/2011)


    [rant]

    This takes the biscuit http://www.sqlservercentral.com/Forums/FindPost1112017.aspx

    [/rant]

    hahahahaha....sorry you put so much time into that one, but that's pretty funny...

    True - at least I had a nice steak in the middle...

Viewing 15 posts - 1,381 through 1,395 (of 1,957 total)