Forum Replies Created

Viewing 15 posts - 4,006 through 4,020 (of 6,038 total)

  • RE: SQL Query - Possibly the most poorly written query in the history of mankind

    LOL! Every SQL Server related job I've ever had, at some point during the first week, I get handed some pile of nonsense like this and told it's now one...

  • RE: Efficient way to delete historical data

    Or when rolling off to history hourly:

    where datediff( hour, PrintDate, getdate() ) > 120;

  • RE: Efficient way to delete historical data

    Could it all be as simple this: a single delete operation that leverages an output clause to insert deleted rows into a history table? If this were to be...

  • RE: removing duplicates

    You can prevent duplication of service codes by leveraging an INSTEAD OF INSERT, UPDATE trigger where each service column is conditionally populated depending on whether a preceeding service column has...

  • RE: Truncate table failing (intermittently), no errors presenting.

    If the procedure uses BEGIN TRY / BEGIN CATCH error handling, then confirm what it's doing with trapped errors. Consider commenting out the error handling blocks and just let...

  • RE: Efficient way to delete historical data

    Really, your disposable audit records that you purge after five days must have referential integrity and must be totally consistent? Let's consider that over engineering on the part of the...

  • RE: Common Mistakes

    Eric JOATMON (4/1/2015)


    Steve, when I first read your post, in which you said "we suffer from the chef problem in techology", I thought you were going to make an anology...

  • RE: Efficient way to delete historical data

    Maddave (3/30/2015)


    ...

    I've been asked to come up with a better solution to delete the data. I can delete it in batches, which would solve the tlog growth, but it wouldn't...

  • RE: Intensive lock

    sqlfriends (3/31/2015)


    Thank you, yes the session is blocked by other sessions doing the same query with different parameters

    The query is:

    (@p0 datetime,@p1 datetime,@p2 bigint,@p3 datetime,@p4 datetime,@p5...

  • RE: Intensive lock

    sqlfriends (3/31/2015)


    Any suggestions about the solution according to the chart I attached?

    Thanks!

    Post the text for the actual UPDATE statement and also for the statement that is blocking.

    Am I...

  • RE: First Episodes

    Once a year I watch 'The Sound of Music' with the family. This is one movie that could never be properly redone.

  • RE: First Episodes

    Michael Valentine Jones (3/31/2015)


    It amazes me when they make a movie of an old TV series that I thought was terrible even when I was a kid.

    Lost in Space

    The Brady...

  • RE: Snapshot of data, compare previous day

    SQL_Kills (3/31/2015)


    Hi,

    I tried to do a cross join but it wasn't working, do you have a example?

    Thanks

    What I was referring to is something like the following. Here we have a...

  • RE: Snapshot of data, compare previous day

    SQL_Kills (3/29/2015)


    A0001 still needs to appear as 50 as a Difference for the InjectedDate 2015-03-05 23:19:01.727

    To pad a resultset with missing rows required to form a complete set, you can...

  • RE: How to quickly update/insert 3M records in a large table?

    Most ETL jobs from source to target want to perform both inserts for new rows and updates for existing rows having the same primary key. However, if you only need...

Viewing 15 posts - 4,006 through 4,020 (of 6,038 total)