Viewing 15 posts - 1,981 through 1,995 (of 2,883 total)
I do agree with you Jeff, I have xp_cmdshell enabled in a lot of places. You just have to be careful with it. It is very easy to turn it...
April 22, 2020 at 5:06 pm
That is what I said it would do: "The new method above only allows 2 trips per overlap grouping. So using my example above of trip 1, 2, and 3...
April 22, 2020 at 4:57 pm
I'm not seeing duplicates... change the "order by" to be by "grouping" and you will see that it is showing you multiple overlaps (ie groups); not duplicates. If trip 1...
April 22, 2020 at 4:09 pm
do you have some sample data where it is doing duplicates? There shouldn't be duplicates as it is doing a distinct already in the CTE...
April 22, 2020 at 3:17 pm
Which is the slow portion of that query? Are ALL of the UPDATEs and INSERTs slow and taking roughly the same time to complete?
Is this a "run-once" query or is...
April 22, 2020 at 2:42 pm
Yep; xp_cmdshell would solve that, but you'd need to enable it and some auditors don't like having that enabled.
UNC paths are likely going to be the safest and most reliable...
April 22, 2020 at 2:35 pm
What is your disk I/O?
One thing that can help is to change your "between" to a > and <. Between comparisons have been known to have performance issues.
On top of...
April 21, 2020 at 9:55 pm
Network drive letters are mapped per user, not per machine. So mapping the drive with "net use" will map the drive for you not the SQL Server Service account. You...
April 21, 2020 at 9:44 pm
The first issue is easy to fix - you are only showing "t" not "t2". So when you join things t and t2 are he ones that overlap. If you...
April 21, 2020 at 9:19 pm
I agree with Ken here that the application side is better suited for this.
Personally, I would refrain from using undocumented features as they can change behavior OR be removed completely...
April 21, 2020 at 2:18 pm
Nice work Ken! Your solution is cleaner than mine. I did find a flaw with it though - if you have a gap in the dates, you can get into...
April 20, 2020 at 8:09 pm
That is strange. Generally, that error is accompanied by some other messages. You checked both SQL instances for error messages and that is the only error message you see? Not...
April 20, 2020 at 7:29 pm
Any other errors in the log? I imagine you are getting some error prior to that one which may help in troubleshooting and pointing you in the correct direction...
April 20, 2020 at 5:33 pm
DEFINITELY not an ideal solution, but works with the sample data (plus an extra a ways in the future). It assumes the documentID is the order in which documents arrived,...
April 20, 2020 at 5:28 pm
Nice easy question that I actually got hit with recently. Code that had been running live for 11 years, someone reported it was missing a column. Went digging and saw...
April 20, 2020 at 2:40 pm
Viewing 15 posts - 1,981 through 1,995 (of 2,883 total)