Viewing 15 posts - 211 through 225 (of 4,080 total)
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
September 13, 2016 at 7:28 am
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
September 13, 2016 at 7:09 am
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
September 13, 2016 at 6:54 am
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
September 13, 2016 at 6:51 am
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
September 12, 2016 at 3:06 pm
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
September 12, 2016 at 11:37 am
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
September 12, 2016 at 6:04 am
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
September 11, 2016 at 12:33 pm
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
September 10, 2016 at 10:27 pm
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
September 10, 2016 at 4:00 pm
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
September 10, 2016 at 8:54 am
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
September 9, 2016 at 9:26 pm
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
September 9, 2016 at 6:56 pm
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
September 9, 2016 at 3:30 pm
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
September 9, 2016 at 3:06 pm
Viewing 15 posts - 211 through 225 (of 4,080 total)