Forum Replies Created

Viewing 15 posts - 211 through 225 (of 4,080 total)

  • RE: delete millions of rows

    Yes, and it's a little annoying to keep hearing "if you'd designed your clustering key for this problem, it wouldn't be a problem." 🙂

    You only get one clustering...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How to use Windows Scheduler to run a Simple SQL Batch File?????

    Withdrawn, sorry about that.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    you might be able to use the false positives against an EXCEPT for final determination

    Jeff, how am I going to know if it's a false positive or not, without doing...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    If clustered index definition matched the definition of "old" data - there would be barely any fragmentation caused by the looping deletion.

    That's a big IF, Sergiy. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How to find overlapping records in evolved dimension table

    Are you storing your begin_dates and end_dates as char or varchar columns?

    I ask because at some point your example data apparently switches from DD/MM/YYYY format to MM/DD/YYYY....

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Impressive Accomplishments

    The last time I hired someone, he was literally the weakest candidate - on paper. But then, several people weeded themselves out in phone interviews, and one local person...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Execution plan ignoring a Temp Table being used to filter the results

    When you join two tables, the optimizer should know which one is the smaller. It doesn't have to follow the sequence in which the tables were listed in...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    I have not. My widest table is "only" 138 columns wide and I'm pretty ticked off at that especially considering the all the bloody columns that have 0 or very...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: A Case FOR Cursors...

    A note about WHILE loops versus cursors. If you are using a WHILE loop with some sort of logic to increment the next row to be read, then...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: t-sql 2012 case statement issue

    You've been asking questions here long enough to know we need some sample data and expected output.

    Post some up and we'll fix your problem for you.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    I'll admit the loop is going to run a long time, but you don't have to worry about missing a constraint, nonclustered index, foreign key, etc. On the...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    Jeff, wouldn't you have to stop activity on the ORIGINAL copy of the table to bring it current with transactions that occur not only during the initial copy but also...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    You might want to have a backup copy of that table before you do such drastic surgery, but if you're sure you want to get rid of 80% of it.......

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: An INSERT statement cannot contain a SELECT statement that assigns values to a variable.

    Glad you figured it out! 😀 Here's another way.

    Even though you can insert data into a table using the output from the EXEC(@SQL), you might also...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Are the posted questions getting worse?

    Alan.B (9/9/2016)


    I just spent 5 minutes trying to figure out whey this INSERT statement was failing

    "Whey" is the second hint. Have a great weekend 😀

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 211 through 225 (of 4,080 total)