Forum Replies Created

Viewing 15 posts - 376 through 390 (of 562 total)

  • RE: Running a script in a specific database.

    Luis Cazares (12/2/2014)


    .... over complicated.....

    Yes I think it is over complicated, hense the question.

    But I did not find a less cumbersome solution.

    The specific usage was to add a stored procedure...

  • RE: Merge statement when matched then update, I would like to use the OUTPUT.

    spaghettidba (10/27/2014)


    This should do the trick:

    Yes this is what I was after.

    Thanks very much for pointing me in the right direction.

    I just implemented this within my code and it does...

  • RE: Merge statement when matched then update, I would like to use the OUTPUT.

    First of all thanks for the example. (Kudos).

    I adjusted the example see below. (The identity does not get updated)

    When an update is done, all fields are updated exept the identity...

  • RE: Adding an 'ORDER BY' clause removes part of a list.

    First of all thanks,

    Now I see I did muck up a bit, the temp table ##WW should have been ordered, see the code below. Probably lost that part of the...

  • RE: Stored procedure to create a view in ANOTHER database.

    Thanks for both answers.

    I'll probably will go for Luis solution.

    This will solve my problem of generating views for more than one database using a single stored procedure.

    Thx

    Ben

  • RE: Changing the fillfactor prevents pageid errors.

    Additional information.

    The Showcontig information from both situations is very simular.

    dbcc showcontig('B')

    /*

    -- FROM AN ERROR SITUATION :

    DBCC SHOWCONTIG scanning 'B' table...

    Table: 'BIL_Performed_Activities' (1157579162); index ID: 1, database ID: 11

    TABLE level scan...

  • RE: Chain of tables.

    Grant Fritchey (6/16/2014)


    If filtering on tableA is what you needed, just do that. The INNER JOIN will take care of the rest.

    Thanks for you response, offcourse this was a 'simplyfied'...

  • RE: Distribution of data, percentile curve.

    Hello all,

    Thanks for your contributions and sorry for not responding.

    This weekend I had a fall and have a head injuri. In a few days time everything should be back...

  • RE: Find rows in table A which do not exist in table B.

    gbritton1 (4/25/2014)


    Assuming A and B have the same schema:

    select * from A

    except

    select * from B

    Thank you this is exactly what I was looking for.

    Ben

    LutzM (4/25/2014)


    By definition, there is no "first...

  • RE: Random fill.

    mister.magoo (4/21/2014)


    The problem I see with a truly random fill is that you need to select one value from 4000 for each of 700,000 source rows, so I can see...

  • RE: Random fill.

    J Livingston SQL (4/19/2014)


    maybe food for thought....

    the random data is a bit simplistic...but relatively large.

    not sure if this meets your requirements.

    First thanks for your contribution.

    In your solution, the Target table...

  • RE: Random fill.

    J Livingston SQL (4/19/2014)


    [p](Code is used for more than 60 or 70 tables in three different databases).

    [/p]

    out of curiosity....whats the reasoning behind this proc?

    Code is used for several reasons.

    Mostly to...

  • RE: Random fill.

    mister.magoo (4/19/2014)


    Yes, I can see that taking a long time as it is performing the outer apply ( selecting 1 from 4000 ) for each of the 700000 target...

  • RE: Random fill.

    mister.magoo (4/19/2014)


    Like I said, I couldn't guarantee it, although on the test data you supplied, it worked for me where the other methods failed.

    You definitely used an outer apply, and...

  • RE: Random fill.

    mister.magoo (4/19/2014)


    Try this...simply referencing a column from the target table in the APPLY, using OUTER instead of CROSS and updating the referenced column as well forces the randomisation to work...

Viewing 15 posts - 376 through 390 (of 562 total)